mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Merge pull request #1803 from paulkaplan/remove-promise-finally
Remove promise finally because we are having trouble with polyfills
This commit is contained in:
commit
051e2f5014
1 changed files with 6 additions and 2 deletions
|
@ -121,6 +121,10 @@ const fetchBitmapCanvas_ = function (costume, runtime, rotationCenter) {
|
||||||
}
|
}
|
||||||
costume.bitmapResolution = 2;
|
costume.bitmapResolution = 2;
|
||||||
|
|
||||||
|
// Clean up the costume object
|
||||||
|
delete costume.textLayerMD5;
|
||||||
|
delete costume.textLayerAsset;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
canvas: canvas,
|
canvas: canvas,
|
||||||
rotationCenter: rotationCenter,
|
rotationCenter: rotationCenter,
|
||||||
|
@ -128,8 +132,8 @@ const fetchBitmapCanvas_ = function (costume, runtime, rotationCenter) {
|
||||||
assetMatchesBase: scale === 1 && !textImageElement
|
assetMatchesBase: scale === 1 && !textImageElement
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.catch(() => {
|
||||||
// Clean up the costume object
|
// Clean up the text layer properties if it fails to load
|
||||||
delete costume.textLayerMD5;
|
delete costume.textLayerMD5;
|
||||||
delete costume.textLayerAsset;
|
delete costume.textLayerAsset;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue