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);
|
||||
|
||||
if (options) {
|
||||
if (options.openPane) this.openPane = true;
|
||||
if (options.automatedTest) this.automatedTest = true;
|
||||
if (options.skipBundledFiles) this.skipBundledFiles = true;
|
||||
let opts = [
|
||||
'openPane',
|
||||
'automatedTest',
|
||||
'skipBundledFiles'
|
||||
];
|
||||
opts.filter(opt => options[opt]).forEach(opt => this[opt] = true);
|
||||
}
|
||||
|
||||
this.mainThread = Services.tm.mainThread;
|
||||
|
|
Loading…
Reference in a new issue