Merge pull request #2011 from bromagosa/mod-project-load-fix

Fixes freeze when trying to load a block into a nonexistent category
upd4.2
Jens Mönig 2018-02-09 11:25:33 +01:00 zatwierdzone przez GitHub
commit 145c60fff0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1148,7 +1148,7 @@ SnapSerializer.prototype.loadBlock = function (model, isReporter, object) {
: null
);
}
if (!info) {
if (!info || !contains(SpriteMorph.prototype.categories, info.category)) {
return this.obsoleteBlock(isReporter);
}
block = info.type === 'command' ? new CustomCommandBlockMorph(