From 1cead3fb48b4662a67f9216bfc066f7dfdfcf3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=B6hn?= Date: Sun, 21 Nov 2021 21:27:00 +0100 Subject: [PATCH] [blockly] fix audio block code generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Höhn --- .../web/src/assets/definitions/blockly/blocks-audio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js index 43010a21b1..f676de4f09 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-audio.js @@ -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 }