www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 2f620c5f91fcf88c88a1888041de3d0a1a8fc1e9
parent 763d7dec75c797bd49d7ddc51e313056d6b736ce
Author: Adomas VenĨkauskas <adomas.ven@gmail.com>
Date:   Tue, 22 May 2018 13:28:13 +0300

Fix corrupt bibliography handling. Closes #1503

Diffstat:
Mchrome/content/zotero/xpcom/integration.js | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js @@ -2318,8 +2318,9 @@ Zotero.Integration.BibliographyField = class extends Zotero.Integration.Field { }; async unserialize() { + var code = this.getCode(); try { - return JSON.parse(this.getCode()); + return JSON.parse(code); } catch(e) { return this.resolveCorrupt(code); } @@ -2333,7 +2334,7 @@ Zotero.Integration.BibliographyField = class extends Zotero.Integration.Field { throw new Zotero.Exception.UserCancelled("corrupt bibliography resolution"); } else { await this.clearCode(); - return unserialize(); + return this.unserialize(); } } };