From 24062861807bcd1dc060bcbc7d282801f9e61526 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Wed, 2 Jan 2019 12:13:43 -0500 Subject: [PATCH] Fix test expectation, this is @kchadha's fault :) --- src/import/load-costume.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/import/load-costume.js b/src/import/load-costume.js index e2ce43345..0e94b690b 100644 --- a/src/import/load-costume.js +++ b/src/import/load-costume.js @@ -267,10 +267,6 @@ const loadCostume = function (md5ext, costume, runtime, optVersion) { const assetType = (ext === 'svg') ? AssetType.ImageVector : AssetType.ImageBitmap; const costumePromise = runtime.storage.load(assetType, md5, ext); - if (!costumePromise) { - log.error(`Couldn't fetch costume asset: ${md5ext}`); - return; - } let textLayerPromise; if (costume.textLayerMD5) { @@ -280,6 +276,9 @@ const loadCostume = function (md5ext, costume, runtime, optVersion) { } return Promise.all([costumePromise, textLayerPromise]).then(assetArray => { + if (!assetArray[0]) { + throw new Error(`Couldn't fetch costume asset: ${md5ext}`); + } costume.asset = assetArray[0]; if (assetArray[1]) { costume.textLayerAsset = assetArray[1];