From 6dbcdb95f444618f2532b7e41effe28b47915d1e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 12 Aug 2014 22:16:53 -0400 Subject: [PATCH] Fix variable name --- chrome/content/zotero/xpcom/data/libraries.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/libraries.js b/chrome/content/zotero/xpcom/data/libraries.js index ffb42f07d..7e4d29fe9 100644 --- a/chrome/content/zotero/xpcom/data/libraries.js +++ b/chrome/content/zotero/xpcom/data/libraries.js @@ -37,8 +37,6 @@ Zotero.Libraries = new function () { version: row.version }; } - - // Current library }); this.exists = function (libraryID) { @@ -97,10 +95,10 @@ Zotero.Libraries = new function () { if (libraryID === 0) { return 'user'; } - if (!_libraryTypes[libraryID]) { + if (!_libraryData[libraryID]) { throw new Error("Library data not loaded for library " + libraryID); } - return _libraryTypes[libraryID].type; + return _libraryData[libraryID].type; } /** @@ -108,10 +106,10 @@ Zotero.Libraries = new function () { * @return {Integer} */ this.getVersion = function (libraryID) { - if (!_libraryTypes[libraryID]) { + if (!_libraryData[libraryID]) { throw new Error("Library data not loaded for library " + libraryID); } - return _libraryTypes[libraryID].version; + return _libraryData[libraryID].version; } @@ -124,7 +122,7 @@ Zotero.Libraries = new function () { version = parseInt(version); var sql = "UPDATE libraries SET version=? WHERE libraryID=?"; yield Zotero.DB.queryAsync(sql, [version, libraryID]); - _libraryTypes[libraryID] = version; + _libraryData[libraryID] = version; });