Prevent infinite loop if search points to itself
This commit is contained in:
parent
0513cd0eef
commit
ea513edf73
|
@ -1203,6 +1203,10 @@ Zotero.Search.prototype._buildQuery = Zotero.Promise.coroutine(function* () {
|
||||||
id: 0
|
id: 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (objectType == 'search' && obj == this) {
|
||||||
|
Zotero.warn(`Search "${this.name}" references itself -- skipping condition`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (objectType == 'collection') {
|
if (objectType == 'collection') {
|
||||||
let ids = [obj.id];
|
let ids = [obj.id];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user