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];