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