commit 1ce4cda3847af26314a502a4219bbfd93d56e741
parent 0803bb84e359db2f8febdffcc028196da0ff2ae1
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 29 Oct 2015 03:07:27 -0400
Don't change 0 to null in Zotero.DataObjectUtilities.checkKey()
Not totally sure this function should allow falsy values to begin with,
but it does.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/data/dataObjectUtilities.js b/chrome/content/zotero/xpcom/data/dataObjectUtilities.js
@@ -75,7 +75,7 @@ Zotero.DataObjectUtilities = {
"checkKey": function(key) {
- if (!key) return null;
+ if (!key && key !== 0) return null;
if (!Zotero.Utilities.isValidObjectKey(key)) {
throw new Error("key is not valid");
}