diff --git a/src/serialization/sb3.js b/src/serialization/sb3.js index 816b1af19..3ffac8ead 100644 --- a/src/serialization/sb3.js +++ b/src/serialization/sb3.js @@ -75,7 +75,11 @@ const parseScratchObject = function (object, runtime) { rotationCenterX: costumeSource.rotationCenterX, rotationCenterY: costumeSource.rotationCenterY }; - const costumeMd5 = `${costumeSource.assetId}.${costumeSource.dataFormat}`; + const dataFormat = + costumeSource.dataFormat || + (costumeSource.assetType && costumeSource.assetType.runtimeFormat) || // older format + 'png'; // if all else fails, guess that it might be a PNG + const costumeMd5 = `${costumeSource.assetId}.${dataFormat}`; return loadCostume(costumeMd5, costume, runtime); }); // Sounds from JSON