Ticket #1770: citations-undefined.patch
| File citations-undefined.patch, 1.4 KB (added by fbennett, 6 years ago) |
|---|
-
chrome/content/zotero/xpcom/integration.js
1371 1371 citation.citationID = Zotero.randomString(); 1372 1372 } 1373 1373 this.newIndices[index] = true; 1374 this.updateIndices[index] = true; 1374 // Adding a citation, so newIndices flag does the trick. 1375 // Flagging in updateIndices as well causes processor crash. 1376 //this.updateIndices[index] = true; 1375 1377 } 1376 1378 Zotero.debug("Zotero.Integration: adding citationID "+citation.citationID); 1377 1379 this.citationIDs[citation.citationID] = true; … … 1544 1546 if(regenerateAll || this.regenerateAll) { 1545 1547 // update all indices 1546 1548 for(var i=0; i<this.citationsByIndex.length; i++) { 1547 this.newIndices[i] = true;1548 1549 this.updateIndices[i] = true; 1550 if (this.newIndices[i]) { 1551 delete this.newIndices[i]; 1552 } 1549 1553 } 1550 1554 } else { 1551 1555 // update only item IDs … … 1665 1669 */ 1666 1670 Zotero.Integration.Session.prototype.restoreProcessorState = function() { 1667 1671 var citations = []; 1668 for(var i in this.citationsByIndex .length) {1669 if(this.citationsByIndex[i] && !this. newIndices[i] && !this.citationsByIndex[i].properties.delete) {1672 for(var i in this.citationsByIndex) { 1673 if(this.citationsByIndex[i] && !this.citationsByIndex[i].properties.delete) { 1670 1674 citations.push(this.citationsByIndex[i]); 1671 1675 } 1672 1676 }