Skip to content

Commit

Permalink
Widget expressions: Improve @ shorthand code (#2446)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Mar 4, 2024
1 parent da80fbd commit 74620c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ expr.jsep.plugins.register(jsepRegex, jsepArrow, jsepObject, jsepTemplate)
expr.addUnaryOp('@', (itemName) => {
if (itemName === undefined) return undefined
const item = store.getters.trackedItems[itemName]
return item.displayState || item.state
return (item.displayState !== undefined) ? item.displayState : item.state
})
expr.addUnaryOp('@@', (itemName) => {
if (itemName === undefined) return undefined
Expand Down

0 comments on commit 74620c3

Please sign in to comment.