mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Fix test expectation, this is @kchadha's fault :)
This commit is contained in:
parent
80ff7e6756
commit
2406286180
1 changed files with 3 additions and 4 deletions
|
@ -267,10 +267,6 @@ const loadCostume = function (md5ext, costume, runtime, optVersion) {
|
||||||
const assetType = (ext === 'svg') ? AssetType.ImageVector : AssetType.ImageBitmap;
|
const assetType = (ext === 'svg') ? AssetType.ImageVector : AssetType.ImageBitmap;
|
||||||
|
|
||||||
const costumePromise = runtime.storage.load(assetType, md5, ext);
|
const costumePromise = runtime.storage.load(assetType, md5, ext);
|
||||||
if (!costumePromise) {
|
|
||||||
log.error(`Couldn't fetch costume asset: ${md5ext}`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let textLayerPromise;
|
let textLayerPromise;
|
||||||
if (costume.textLayerMD5) {
|
if (costume.textLayerMD5) {
|
||||||
|
@ -280,6 +276,9 @@ const loadCostume = function (md5ext, costume, runtime, optVersion) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.all([costumePromise, textLayerPromise]).then(assetArray => {
|
return Promise.all([costumePromise, textLayerPromise]).then(assetArray => {
|
||||||
|
if (!assetArray[0]) {
|
||||||
|
throw new Error(`Couldn't fetch costume asset: ${md5ext}`);
|
||||||
|
}
|
||||||
costume.asset = assetArray[0];
|
costume.asset = assetArray[0];
|
||||||
if (assetArray[1]) {
|
if (assetArray[1]) {
|
||||||
costume.textLayerAsset = assetArray[1];
|
costume.textLayerAsset = assetArray[1];
|
||||||
|
|
Loading…
Reference in a new issue