From 3aafde3335d94c1fca4d77a1405578691d418696 Mon Sep 17 00:00:00 2001 From: emizzle Date: Tue, 12 Mar 2019 12:56:15 +1100 Subject: [PATCH] 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. --- packages/embark/src/lib/core/config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/embark/src/lib/core/config.js b/packages/embark/src/lib/core/config.js index e77c412319..fead2460d6 100644 --- a/packages/embark/src/lib/core/config.js +++ b/packages/embark/src/lib/core/config.js @@ -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]); });