Merge pull request #102 from ericrosenbaum/bugfix/dynamic-menus
Check for empty sound array
This commit is contained in:
commit
7097d16ffd
1 file changed
+5
-1
+5
-1
@@ -22,7 +22,11 @@ module.exports = function (vm) {
|
||||
};
|
||||
|
||||
const soundsMenu = function () {
|
||||
return vm.editingTarget.sprite.sounds.map(sound => [sound.name, sound.name]);
|
||||
const sounds = vm.editingTarget.sprite.sounds;
|
||||
if (sounds.length === 0) {
|
||||
return [['', '']];
|
||||
}
|
||||
return sounds.map(sound => [sound.name, sound.name]);
|
||||
};
|
||||
|
||||
const costumesMenu = function () {
|
||||
|
||||
Reference in new issue
Block a user