From d3f746021d2ef25ff6dd25f238a5feac99fcd28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Tue, 13 Dec 2022 10:02:58 +0100 Subject: [PATCH] Zotero: avoid request when url is not set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Szymon Kłos Change-Id: I9ebdafcc8c18f7bab11b52dd87577eb2f08e570e --- browser/src/control/Control.Zotero.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/browser/src/control/Control.Zotero.js b/browser/src/control/Control.Zotero.js index d212a6e32..423479f3b 100644 --- a/browser/src/control/Control.Zotero.js +++ b/browser/src/control/Control.Zotero.js @@ -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();})