Fix non-integer warning when purging ids from sourceList.persist

This commit is contained in:
Dan Stillman 2017-09-18 17:02:25 -04:00
parent d83d70eb5c
commit 49506b6d94

View File

@ -1465,7 +1465,7 @@ Zotero.CollectionTreeView.prototype._saveOpenStates = Zotero.Promise.coroutine(f
for (var id in state) {
var m = id.match(/^C([0-9]+)$/);
if (m) {
if (!(yield Zotero.Collections.getAsync(m[1]))) {
if (!(yield Zotero.Collections.getAsync(parseInt(m[1])))) {
delete state[id];
}
continue;
@ -1473,7 +1473,7 @@ Zotero.CollectionTreeView.prototype._saveOpenStates = Zotero.Promise.coroutine(f
var m = id.match(/^G([0-9]+)$/);
if (m) {
if (!Zotero.Groups.get(m[1])) {
if (!Zotero.Groups.get(parseInt(m[1]))) {
delete state[id];
}
continue;