Open
Description
Is this a bug in companion itself or a module?
- I believe this to be a bug in companion
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When I'm using Expressions in a Press Action or a Trigger, the paren processing is inconsistent.
Examples:
This works:
foo = 1
bar = "home"
foo == -1 ? "0" : (bar == "home" ? "0" : bar)
This does not:
foo = 1
bar = "home"
(foo == -1) ? "0" : (bar == "home" ? "0" : bar)
Internal/CustomVariables: Error: Unsupported function "undefined", in expression: "foo = 1
bar = "home"
(foo == -1) ? "0" : (bar == "home" ? "0" : bar)"
But this works:
bar = "home"
foo = 1
(foo == -1) ? "0" : (bar == "home" ? "0" : bar)
This does not work:
"hi"
(1 == 0) ? true : false
This works:
1
(1 == 0) ? true : false
The second example should parse correctly. I assume it must think "{string}" is a function name?
Steps To Reproduce
- Go to a place where you are working with an expression
- Type "(1==0) ? true : false"
- It works!
- Add a string before that line, either an assignment (foo="bar") or just "bar".
- It doesn't work.
Expected Behavior
I would expect lines after a string to parse correctly.
Environment (please complete the following information)
- OS: MacOS 15.1.1
- Browser: Safari 18.1.1
- Companion Version: 3.4.3
Additional context
No response