Simplify assignment of init options
This commit is contained in:
parent
0f19e5c89b
commit
4082ff9e8c
1 changed files with 6 additions and 3 deletions
|
@ -176,9 +176,12 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
|
||||||
Zotero.Debug.init(options && options.forceDebugLog);
|
Zotero.Debug.init(options && options.forceDebugLog);
|
||||||
|
|
||||||
if (options) {
|
if (options) {
|
||||||
if (options.openPane) this.openPane = true;
|
let opts = [
|
||||||
if (options.automatedTest) this.automatedTest = true;
|
'openPane',
|
||||||
if (options.skipBundledFiles) this.skipBundledFiles = true;
|
'automatedTest',
|
||||||
|
'skipBundledFiles'
|
||||||
|
];
|
||||||
|
opts.filter(opt => options[opt]).forEach(opt => this[opt] = true);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mainThread = Services.tm.mainThread;
|
this.mainThread = Services.tm.mainThread;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue