Support 3.0 library syntax when fetching assets

Fixes https://github.com/LLK/scratch-desktop/issues/92
This commit is contained in:
Paul Kaplan 2020-01-14 11:28:27 -05:00 committed by GitHub
parent 96953c4acd
commit aa3c1abbc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,10 +23,14 @@ const collectSimple = function (library, dest, debugLabel = 'Item') {
++md5Count;
dest.add(item.md5);
}
if (item.baseLayerMD5) {
if (item.baseLayerMD5) { // 2.0 library syntax for costumes
++md5Count;
dest.add(item.baseLayerMD5);
}
if (item.md5ext) { // 3.0 library syntax for costumes
++md5Count;
dest.add(item.md5ext);
}
if (md5Count < 1) {
console.warn(`${debugLabel} has no MD5 property:\n${describe(item)}`);
} else if (md5Count > 1) {