Ensure that md5 and assetId stay in sync.

This commit is contained in:
Karishma Chadha 2018-03-05 15:16:00 -05:00
parent 9d8602db93
commit c0afcd2ab3
2 changed files with 2 additions and 1 deletions
src/serialization

View file

@ -19,7 +19,7 @@ const serializeAssets = function (runtime, assetType) {
const storage = runtime.storage;
const storedAsset = storage.get(assetId);
assetDescs.push({
fileName: assetType === 'sound' ?
fileName: currAsset.md5 ?
currAsset.md5 : `${assetId}.${storedAsset.dataFormat}`,
fileContent: storedAsset.data});
}