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:
Szymon Kłos 2022-12-13 10:02:58 +01:00 committed by Szymon Kłos
parent dd840148bb
commit d3f746021d

View file

@ -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();})