mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-03 17:14:27 -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++) {
|
||||
const currAsset = currAssets[j];
|
||||
const asset = currAsset.broken ? currAsset.broken.asset : currAsset.asset;
|
||||
if (!asset) {
|
||||
continue;
|
||||
if (asset) {
|
||||
// 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue