Not providing a zip to deserialize asset functions is not an error.

This commit is contained in:
Karishma Chadha 2018-04-06 15:04:03 -04:00
parent 58c9b11dd3
commit 5d46f8de99

View file

@ -30,11 +30,7 @@ const deserializeSound = function (sound, runtime, zip, assetFileName) {
// This sound has already been cached.
return Promise.resolve(null);
}
if (!zip) {
// TODO adding this case to make integration tests pass, need to rethink
// the entire structure of saving/loading here (w.r.t. differences between
// loading from local zip file or from server)
log.error('Zipped assets were not provided.');
if (!zip) { // Zip will not be provided if loading project json from server
return Promise.resolve(null);
}
const soundFile = zip.file(fileName);
@ -93,11 +89,7 @@ const deserializeCostume = function (costume, runtime, zip, assetFileName) {
return Promise.resolve(null);
}
if (!zip) {
// TODO adding this case to make integration tests pass, need to rethink
// the entire structure of saving/loading here (w.r.t. differences between
// loading from local zip file or from server)
log.error('Zipped assets were not provided.');
if (!zip) { // Zip will not be provided if loading project json from server
return Promise.resolve(null);
}