From 42ac976f1ebb64c42a492ee7eef134ab0df3c094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Thu, 18 Jun 2020 16:13:47 +0300 Subject: [PATCH] Do not attempt to update bibliography when no citations are present --- chrome/content/zotero/xpcom/integration.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 65129f9b9f..8e3fa7a5ee 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1121,6 +1121,7 @@ Zotero.Integration.Fields.prototype._updateDocument = async function(forceCitati // update bibliographies if (this._session.bibliography // if bibliography exists + && Object.keys(this._session.citationsByIndex).length // and doc has citations && (this._session.bibliographyHasChanged // and bibliography changed || forceBibliography)) { // or if we should generate regardless of // changes