commit a4572c94420c73ea154ab9ebfa9ad1e1ae078db7
parent 27cb099c8251b902f3dc7dafc06da48da1c0cf1e
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 8 Feb 2017 14:58:03 -0500
Make sure 'collections' passed to Translate is an array
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js
@@ -1278,6 +1278,9 @@ Zotero.Translate.Base.prototype = {
this._currentState = "translate";
this._libraryID = options.libraryID;
+ if (options.collections && !Array.isArray(options.collections)) {
+ throw new Error("'collections' must be an array");
+ }
this._collections = options.collections;
this._saveAttachments = options.saveAttachments === undefined || options.saveAttachments;