commit b9430a5fb1a6626bc207efa9aee469ddfc3c34d6
parent 6b82ca8aa6901162f4c73e65a9b643d201178f64
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 27 Oct 2008 22:45:07 +0000
Fix potential upgrade error
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js
@@ -2073,7 +2073,8 @@ Zotero.Schema = new function(){
if (rows) {
for (var j=0; j<rows.length-1; j++) {
var k = j + 1;
- while (rows[k].lastName == rows[j].lastName &&
+ while (k < rows.length &&
+ rows[k].lastName == rows[j].lastName &&
rows[k].firstName == rows[j].firstName &&
rows[k].fieldMode == rows[j].fieldMode) {
Zotero.DB.query("UPDATE creators SET creatorDataID=? WHERE creatorDataID=?", [rows[j].creatorDataID, rows[k].creatorDataID]);