Skip to content

Commit

Permalink
Make sure 'collections' passed to Translate is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Feb 8, 2017
1 parent 27cb099 commit a4572c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chrome/content/zotero/xpcom/translation/translate.js
Expand Up @@ -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;

Expand Down

0 comments on commit a4572c9

Please sign in to comment.