Compare asset type runtime formats instead of AssetType objects because costume assets can get flattened (e.g. while uploading a sprite from file).

This commit is contained in:
Karishma Chadha 2018-12-07 21:46:28 -05:00
parent ebe06a97d9
commit c1b697b575

View file

@ -211,7 +211,7 @@ const loadCostumeFromAsset = function (costume, runtime, optVersion) {
typeof costume.rotationCenterY === 'number' && !isNaN(costume.rotationCenterY)) {
rotationCenter = [costume.rotationCenterX, costume.rotationCenterY];
}
if (costume.asset.assetType === AssetType.ImageVector) {
if (costume.asset.assetType.runtimeFormat === AssetType.ImageVector.runtimeFormat) {
return loadVector_(costume, runtime, rotationCenter, optVersion);
}
return loadBitmap_(costume, runtime, rotationCenter, optVersion);