Skip to content

Commit

Permalink
fix: and or dropdown render (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Apr 19, 2024
1 parent 5feca12 commit 19e0d88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/frontend/components/checks/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ function RenderCheckNode({
value={currentOperator}
onChange={(val) => {
const newNodeArray = [...node]
newNodeArray[0] = val
if (val !== null) {
newNodeArray[0] = val
}
setNode(newNodeArray as CheckLogic)
}}
/>
Expand All @@ -79,7 +81,7 @@ function RenderCheckNode({
// ts assert node is LogicElement
const s = node as LogicData

const check = checks.find((f) => f.id === s.id)
const check = checks.find((f) => f.id === s?.id)

if (!check) return null

Expand Down

0 comments on commit 19e0d88

Please sign in to comment.