Skip to content

Commit

Permalink
chore(private-credential): constant node in formatLogicNode
Browse files Browse the repository at this point in the history
  • Loading branch information
martonmoro committed Dec 20, 2024
1 parent 87f34ea commit ea0b926
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/features/src/web-connector/utils/render-payload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ const formatLogicNode = (node: LogicNode, level = 0): string => {
.map(([key, value]) => `${key}: ${formatLogicNode(value, level)}`)
.join(`\n${indent}`)
}
case "constant":
if (!node.data) {
throw Error("CONSTANT node must have 'data'")
}
return `${node.data}`

default:
throw Error(`Unknown node type: ${node.type}`)
Expand Down

0 comments on commit ea0b926

Please sign in to comment.