From 1ce4cda3847af26314a502a4219bbfd93d56e741 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 29 Oct 2015 03:07:27 -0400 Subject: [PATCH] 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. --- chrome/content/zotero/xpcom/data/dataObjectUtilities.js | 2 +- 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 index c95b47b26f..e674fc175d 100644 --- 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"); }