mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Updating asset serialization code to get data format from stored asset rather than vm state. Storage seems to be more up to date than vm in the case of editing the blank backdrop, which is stored as a png instead of an svg.
This commit is contained in:
parent
525a8c2ce7
commit
52c77d9fb0
1 changed files with 3 additions and 3 deletions
|
@ -17,11 +17,11 @@ const serializeAssets = function (runtime, assetType) {
|
|||
const currAsset = currAssets[j];
|
||||
const assetId = currAsset.assetId;
|
||||
const storage = runtime.storage;
|
||||
const asset = storage.get(assetId);
|
||||
const storedAsset = storage.get(assetId);
|
||||
assetDescs.push({
|
||||
fileName: assetType === 'sound' ?
|
||||
currAsset.md5 : `${assetId}.${currAsset.dataFormat}`,
|
||||
fileContent: asset.data});
|
||||
currAsset.md5 : `${assetId}.${storedAsset.dataFormat}`,
|
||||
fileContent: storedAsset.data});
|
||||
}
|
||||
}
|
||||
return assetDescs;
|
||||
|
|
Loading…
Reference in a new issue