mirror of https://github.com/embarklabs/embark.git
fix(@embark/pipeline): Prevent crash when assets not specified
Prevent embark from crashing when app assets are not specified in `embark.json`. Previously, if the `app` property of `embark.json` was missing, embark would crash with the error `TypeError: Cannot convert undefined or null to object`. With this PR, the missing property is null-checked.
This commit is contained in:
parent
5ea4807c90
commit
3aafde3335
|
@ -563,6 +563,7 @@ Config.prototype.loadPipelineConfigFile = function() {
|
|||
};
|
||||
|
||||
Config.prototype.loadAssetFiles = function () {
|
||||
if(!this.embarkConfig.app) return;
|
||||
Object.keys(this.embarkConfig.app).forEach(targetFile => {
|
||||
this.assetFiles[targetFile] = this.loadFiles(this.embarkConfig.app[targetFile]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue