mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Move error log to right place
This commit is contained in:
parent
0ad611a200
commit
82e0f71643
1 changed files with 3 additions and 3 deletions
|
@ -171,8 +171,7 @@ const fetchBitmapCanvas_ = function (costume, runtime, rotationCenter) {
|
||||||
assetMatchesBase: scale === 1 && !textImageElement
|
assetMatchesBase: scale === 1 && !textImageElement
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(() => {
|
||||||
log.warn(`${error.name}: ${error.message}`);
|
|
||||||
// Clean up the text layer properties if it fails to load
|
// Clean up the text layer properties if it fails to load
|
||||||
delete costume.textLayerMD5;
|
delete costume.textLayerMD5;
|
||||||
delete costume.textLayerAsset;
|
delete costume.textLayerAsset;
|
||||||
|
@ -261,7 +260,8 @@ const loadCostumeFromAsset = function (costume, runtime, optVersion) {
|
||||||
}
|
}
|
||||||
if (costume.asset.assetType.runtimeFormat === AssetType.ImageVector.runtimeFormat) {
|
if (costume.asset.assetType.runtimeFormat === AssetType.ImageVector.runtimeFormat) {
|
||||||
return loadVector_(costume, runtime, rotationCenter, optVersion)
|
return loadVector_(costume, runtime, rotationCenter, optVersion)
|
||||||
.catch(() => {
|
.catch(error => {
|
||||||
|
log.warn(`${error.name}: ${error.message}`);
|
||||||
// Use default asset if original fails to load
|
// Use default asset if original fails to load
|
||||||
costume.assetId = runtime.storage.defaultAssetId.ImageVector;
|
costume.assetId = runtime.storage.defaultAssetId.ImageVector;
|
||||||
costume.asset = runtime.storage.get(costume.assetId);
|
costume.asset = runtime.storage.get(costume.assetId);
|
||||||
|
|
Loading…
Reference in a new issue