Configuring scratch-vm to use changes made to scratch-parser.

This commit is contained in:
Karishma Chadha 2018-02-22 16:46:24 -05:00
parent e0b23cde31
commit 605ce4b16d
2 changed files with 18 additions and 2 deletions
src/serialization

View file

@ -27,7 +27,13 @@ const deserializeSound = function (sound, runtime, zip) {
// 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.');
return Promise.resolve(null);
}
const soundFile = zip.file(fileName);
if (!soundFile) {
log.error(`Could not find sound file associated with the ${sound.name} sound.`);
@ -82,6 +88,14 @@ const deserializeCostume = function (costume, runtime, zip) {
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.');
return Promise.resolve(null);
}
const costumeFile = zip.file(fileName);
if (!costumeFile) {
log.error(`Could not find costume file associated with the ${costume.name} costume.`);