mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
Not providing a zip to deserialize asset functions is not an error.
This commit is contained in:
parent
58c9b11dd3
commit
5d46f8de99
1 changed files with 2 additions and 10 deletions
|
@ -30,11 +30,7 @@ const deserializeSound = function (sound, runtime, zip, assetFileName) {
|
||||||
// This sound has already been cached.
|
// This sound has already been cached.
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
if (!zip) {
|
if (!zip) { // Zip will not be provided if loading project json from server
|
||||||
// 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);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
const soundFile = zip.file(fileName);
|
const soundFile = zip.file(fileName);
|
||||||
|
@ -93,11 +89,7 @@ const deserializeCostume = function (costume, runtime, zip, assetFileName) {
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!zip) {
|
if (!zip) { // Zip will not be provided if loading project json from server
|
||||||
// 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);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue