www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ea513edf732979d7ec1da089a488bce54de4e6a0
parent 0513cd0eef176f91893dfae26bbb9a6236a35f2e
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 13 Jul 2017 18:07:58 -0400

Prevent infinite loop if search points to itself

Diffstat:
Mchrome/content/zotero/xpcom/data/search.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/search.js b/chrome/content/zotero/xpcom/data/search.js @@ -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];