From 52c77d9fb070aa5fee2d5c5faa3a68ce05e4f906 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Tue, 13 Feb 2018 15:27:40 -0500 Subject: [PATCH] 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. --- src/serialization/serialize-assets.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/serialization/serialize-assets.js b/src/serialization/serialize-assets.js index 0177d2189..d001baa0e 100644 --- a/src/serialization/serialize-assets.js +++ b/src/serialization/serialize-assets.js @@ -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;