Throw proper error when collection is moved into one of its descendents
This commit is contained in:
parent
3c1cdd57d2
commit
f715c02a66
1 changed files with 1 additions and 1 deletions
|
@ -259,7 +259,7 @@ Zotero.Collection.prototype._initSave = Zotero.Promise.coroutine(function* (env)
|
|||
}
|
||||
|
||||
if (this.id && this.hasDescendent('collection', newParent.id)) {
|
||||
throw ('Cannot move collection "' + this.name + '" into one of its own descendents');
|
||||
throw new Error(`Cannot move collection '${this.name}' into one of its own descendents`);
|
||||
}
|
||||
|
||||
env.parent = newParent.id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue