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:
Karishma Chadha 2018-02-13 15:27:40 -05:00
parent 525a8c2ce7
commit 52c77d9fb0

View file

@ -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;