From 9e9caba57cef0cd1920501e72f10389f5860b41c Mon Sep 17 00:00:00 2001 From: stefan-hoehn Date: Tue, 29 Aug 2023 09:40:14 +0200 Subject: [PATCH] [blockly] Fix timer remove regression (#2032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #2002. Signed-off-by: Stefan Höhn --- .../web/src/assets/definitions/blockly/blocks-timers.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-timers.js b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-timers.js index 4f1548af3f..51495934a5 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-timers.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/blockly/blocks-timers.js @@ -89,7 +89,6 @@ export default function defineOHBlocks_Timers (f7, isGraalJs) { let code = `if (cache.${cacheType}.exists(${timerName}) === false || cache.${cacheType}.get(${timerName}).hasTerminated()) {\n` code += ` cache.${cacheType}.put(${timerName}, actions.ScriptExecution.createTimer(${timerName}, time.ZonedDateTime.now().${delayUnits}(${delay}), function () {\n` code += timerCode.replace(/^/gm, ' ') - code += ` cache.${cacheType}.remove(${timerName});\n` code += ' }));\n' code += '};\n' return code @@ -157,7 +156,6 @@ export default function defineOHBlocks_Timers (f7, isGraalJs) { let code = `if (cache.${cacheType}.exists(${timerName}) === false || cache.${cacheType}.get(${timerName}).hasTerminated()) {\n` code += ` cache.${cacheType}.put(${timerName}, actions.ScriptExecution.createTimer(${timerName}, time.ZonedDateTime.now().${delayUnits}(${delay}), function () {\n` code += timerCode.replace(/^/gm, ' ') - code += ` cache.${cacheType}.remove(${timerName});\n` code += ' }));\n' code += '} else {\n' switch (retrigger) {