fix(core/utils): shortcut `embarkConfig.plugins` in case it doesn't exist

This commit is contained in:
Pascal Precht 2020-04-09 17:17:19 +02:00 committed by Pascal Precht
parent ec99cf6ece
commit d83ad01770
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ export function warnIfPackageNotDefinedLocally(packageName, warnFunc, embarkConf
return warnFunc("== WARNING: it seems " + packageName + " is not defined in your dapp's package.json dependencies; In future versions of embark this package should be a local dependency and configured as a plugin");
}
if (!embarkConfig.plugins[packageName]) {
if (!embarkConfig.plugins || !embarkConfig.plugins[packageName]) {
return warnFunc(
__("== WARNING: it seems %s is not defined in your Dapp's embark.json plugins;\nIn future versions of Embark, this package should be a local dependency and configured as a plugin", packageName)
);