www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 3633b053bbb590eaad12b3fd1616cbfcc21a67ab
parent e75dfcf8b589fe862e1a7a861c3d88ed51c0239a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 21 Aug 2008 16:25:17 +0000

Fix "second argument to Function.prototype.apply must be an array" error in schema.js line 1636 on upgrade



Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -1633,7 +1633,7 @@ Zotero.Schema = new function(){ // Migrate big integers var itemIDs = Zotero.DB.columnQuery("SELECT itemID FROM items WHERE itemID>16777215"); var smalls = Zotero.DB.columnQuery("SELECT itemID FROM items WHERE itemID<300000"); - var newID = Math.max.apply(this, smalls); + var newID = smalls ? Math.max.apply(this, smalls) : 0; for each(var oldID in itemIDs) { do { newID = newID + 1;