Make sure 'collections' passed to Translate is an array
This commit is contained in:
parent
27cb099c82
commit
a4572c9442
|
@ -1278,6 +1278,9 @@ Zotero.Translate.Base.prototype = {
|
||||||
this._currentState = "translate";
|
this._currentState = "translate";
|
||||||
|
|
||||||
this._libraryID = options.libraryID;
|
this._libraryID = options.libraryID;
|
||||||
|
if (options.collections && !Array.isArray(options.collections)) {
|
||||||
|
throw new Error("'collections' must be an array");
|
||||||
|
}
|
||||||
this._collections = options.collections;
|
this._collections = options.collections;
|
||||||
this._saveAttachments = options.saveAttachments === undefined || options.saveAttachments;
|
this._saveAttachments = options.saveAttachments === undefined || options.saveAttachments;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user