Fix doc.prefs.noteType handling with NaN values

This commit is contained in:
Adomas Venčkauskas 2017-05-08 09:23:53 +03:00
parent 12e7b7b851
commit 746171ab78

View file

@ -3137,11 +3137,8 @@ Zotero.Integration.DocumentData.prototype.unserializeXML = function(xmlData) {
this.prefs[name] = value;
}
try {
this.prefs.noteType = parseInt(this.prefs.noteType);
} catch (e) {
this.prefs.noteType = 0;
}
this.prefs.noteType = parseInt(this.prefs.noteType) || 0;
if (this.prefs["automaticJournalAbbreviations"] === undefined) this.prefs["automaticJournalAbbreviations"] = false;
this.zoteroVersion = doc.documentElement.getAttribute("zotero-version");
if (!this.zoteroVersion) this.zoteroVersion = "2.0";