Fixes #762, Recursive saved search referencing a deleted collection cannot be deleted
This commit is contained in:
parent
7dad885e86
commit
e59a329d89
|
@ -829,6 +829,12 @@ Zotero.Search.prototype._buildQuery = function(){
|
|||
// Search descendent collections if recursive search
|
||||
if (recursive){
|
||||
var col = Zotero.Collections.get(condition['value']);
|
||||
if (!col) {
|
||||
var msg = "Collection " + condition['value'] + " specified in saved search doesn't exist";
|
||||
Zotero.debug(msg, 2);
|
||||
Zotero.log(msg, 'warning', 'chrome://zotero/content/xpcom/search.js');
|
||||
continue;
|
||||
}
|
||||
var descendents = col.getDescendents(false, 'collection');
|
||||
if (descendents){
|
||||
for (var k in descendents){
|
||||
|
|
Loading…
Reference in New Issue
Block a user