ZeppelinPlugin: read null options as { enabled: false }

This commit is contained in:
Dragory 2020-06-04 03:46:33 +03:00
parent b64335c901
commit a47836977c
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -124,6 +124,12 @@ export class ZeppelinPlugin<
* the plugin, which is why this has to be a static function.
*/
protected static mergeAndDecodeStaticOptions(options: any): IPluginOptions {
if (options == null) {
options = {
enabled: false,
};
}
const defaultOptions: any = this.getStaticDefaultOptions();
let mergedConfig = configUtils.mergeConfig({}, defaultOptions.config || {}, options.config || {});
const mergedOverrides = options.replaceDefaultOverrides