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.
This commit is contained in:
parent
0803bb84e3
commit
1ce4cda384
|
@ -75,7 +75,7 @@ Zotero.DataObjectUtilities = {
|
||||||
|
|
||||||
|
|
||||||
"checkKey": function(key) {
|
"checkKey": function(key) {
|
||||||
if (!key) return null;
|
if (!key && key !== 0) return null;
|
||||||
if (!Zotero.Utilities.isValidObjectKey(key)) {
|
if (!Zotero.Utilities.isValidObjectKey(key)) {
|
||||||
throw new Error("key is not valid");
|
throw new Error("key is not valid");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user