mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-08 20:14:00 -04:00
Rewrite missing asset skip in the affirmative
This commit is contained in:
parent
8b9ce99762
commit
2481f28191
1 changed files with 6 additions and 6 deletions
|
@ -17,13 +17,13 @@ const serializeAssets = function (runtime, assetType, optTargetId) {
|
||||||
for (let j = 0; j < currAssets.length; j++) {
|
for (let j = 0; j < currAssets.length; j++) {
|
||||||
const currAsset = currAssets[j];
|
const currAsset = currAssets[j];
|
||||||
const asset = currAsset.broken ? currAsset.broken.asset : currAsset.asset;
|
const asset = currAsset.broken ? currAsset.broken.asset : currAsset.asset;
|
||||||
if (!asset) {
|
if (asset) {
|
||||||
continue;
|
// Serialize asset if it exists, otherwise skip
|
||||||
|
assetDescs.push({
|
||||||
|
fileName: `${asset.assetId}.${asset.dataFormat}`,
|
||||||
|
fileContent: asset.data
|
||||||
|
});
|
||||||
}
|
}
|
||||||
assetDescs.push({
|
|
||||||
fileName: `${asset.assetId}.${asset.dataFormat}`,
|
|
||||||
fileContent: asset.data
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return assetDescs;
|
return assetDescs;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue