mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[jsscripting] Fix wrapping UI scripts fails if comment in last line (#19129)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This commit is contained in:
+1
-1
@@ -326,7 +326,7 @@ public class OpenhabGraalJSScriptEngine
|
||||
protected String onScript(String script) {
|
||||
if (isUiBasedScript() && configuration.isWrapperEnabled()) {
|
||||
logger.debug("Wrapping script for engine '{}' ...", engineIdentifier);
|
||||
return "(function() {" + script + "})()";
|
||||
return "(function() {" + System.lineSeparator() + script + System.lineSeparator() + "})()";
|
||||
}
|
||||
return super.onScript(script);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user