Zotero: avoid request when url is not set
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I9ebdafcc8c18f7bab11b52dd87577eb2f08e570e
This commit is contained in:
parent
dd840148bb
commit
d3f746021d
1 changed files with 2 additions and 0 deletions
|
@ -289,6 +289,8 @@ L.Control.Zotero = L.Control.extend({
|
|||
if (element === 'treeview') {
|
||||
if (data.id === 'zoterocategory') {
|
||||
var url = index;
|
||||
if (!url)
|
||||
return;
|
||||
that.items = [];
|
||||
fetch(url)
|
||||
.then(function (response) { return response.json();})
|
||||
|
|
Loading…
Reference in a new issue