Check for empty sound array
This commit is contained in:
1 parent
74dde69fd0
commit
c4decffcdb
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