ZeppelinPlugin: read null options as { enabled: false }
This commit is contained in:
parent
b64335c901
commit
a47836977c
1 changed files with 6 additions and 0 deletions
|
@ -124,6 +124,12 @@ export class ZeppelinPlugin<
|
||||||
* the plugin, which is why this has to be a static function.
|
* the plugin, which is why this has to be a static function.
|
||||||
*/
|
*/
|
||||||
protected static mergeAndDecodeStaticOptions(options: any): IPluginOptions {
|
protected static mergeAndDecodeStaticOptions(options: any): IPluginOptions {
|
||||||
|
if (options == null) {
|
||||||
|
options = {
|
||||||
|
enabled: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const defaultOptions: any = this.getStaticDefaultOptions();
|
const defaultOptions: any = this.getStaticDefaultOptions();
|
||||||
let mergedConfig = configUtils.mergeConfig({}, defaultOptions.config || {}, options.config || {});
|
let mergedConfig = configUtils.mergeConfig({}, defaultOptions.config || {}, options.config || {});
|
||||||
const mergedOverrides = options.replaceDefaultOverrides
|
const mergedOverrides = options.replaceDefaultOverrides
|
||||||
|
|
Loading…
Add table
Reference in a new issue