Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const soundsMenu = function () {
let menu = [['', '']];
if (vm.editingTarget && vm.editingTarget.sprite.sounds.length > 0) {
menu = vm.editingTarget.sprite.sounds.map(sound => [sound.name, sound.name]);
}
menu.push([
ScratchBlocks.ScratchMsgs.translate('SOUND_RECORD', 'record...'),
ScratchBlocks.recordSoundCallback
]);
return menu;
};