Skip to content

Commit

Permalink
[blockly] fix audio block code generation (#1211)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Höhn <[email protected]>
  • Loading branch information
stefan-hoehn authored Nov 21, 2021
1 parent bf99312 commit 1e916da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function (f7, sinks, voices) {
let fileName = Blockly.JavaScript.valueToCode(block, 'fileName', Blockly.JavaScript.ORDER_ATOMIC)
let sinkName = Blockly.JavaScript.valueToCode(block, 'sinkName', Blockly.JavaScript.ORDER_ATOMIC).replace('(', '').replace(/[()]/g, '')

let code = `audio.playSound('${sinkName}', ${fileName});\n`
let code = `audio.playSound(${sinkName}, ${fileName});\n`
return code
}

Expand Down

0 comments on commit 1e916da

Please sign in to comment.