Fix "citations is undefined" error

This commit is contained in:
Simon Kornblith 2011-03-03 07:09:08 +00:00
parent 6abaf18fdc
commit d58221b59f

View file

@ -1539,7 +1539,7 @@ Zotero.Integration.Session.prototype.updateUncitedItems = function() {
Zotero.Integration.Session.prototype.updateUpdateIndices = function(regenerateAll) {
if(regenerateAll || this.regenerateAll) {
// update all indices
for(var i=0; i<this.citationsByIndex.length; i++) {
for(var i in this.citationsByIndex) {
this.newIndices[i] = true;
this.updateIndices[i] = true;
}
@ -1661,7 +1661,7 @@ Zotero.Integration.Session.prototype.updateCitations = function() {
*/
Zotero.Integration.Session.prototype.restoreProcessorState = function() {
var citations = [];
for(var i in this.citationsByIndex.length) {
for(var i in this.citationsByIndex) {
if(this.citationsByIndex[i] && !this.newIndices[i] && !this.citationsByIndex[i].properties.delete) {
citations.push(this.citationsByIndex[i]);
}