Ticket #1709: error_api.patch
| File error_api.patch, 1.1 KB (added by fbennett, 6 years ago) |
|---|
-
chrome/content/zotero/xpcom/integration.js
old new 698 698 699 699 // get bibliography and format as RTF 700 700 var bib = this._session.getBibliography(); 701 var bibliographyText = bib[0].bibstart+bib[1].join("\\\r\n")+"\\\r\n"+bib[0].bibend; 701 var bibliographyText = ""; 702 if (bib) { 703 bibliographyText = bib[0].bibstart+bib[1].join("\\\r\n")+"\\\r\n"+bib[0].bibend; 702 704 703 705 // if bibliography style not set, set it 704 706 if(!this._session.data.bibliographyStyleHasBeenSet) { … … 712 714 this._session.data.bibliographyStyleHasBeenSet = true; 713 715 this._doc.setDocumentData(this._session.data.serializeXML()); 714 716 } 717 } 715 718 716 719 // set bibliography text 717 720 for each(var field in this._bibliographyFields) { … … 1332 1335 1333 1336 // generate bibliography 1334 1337 var bib = this.style.makeBibliography(); 1335 1338 if (bib) { 1336 1339 // omit items 1337 1340 Zotero.Cite.removeFromBibliography(bib, this.omittedItems); 1338 1341 … … 1342 1345 bib[1][i] = this.customBibliographyText[bib[0].entry_ids[i]]; 1343 1346 } 1344 1347 } 1348 } 1345 1349 1346 1350 return bib; 1347 1351 }