Skip to content

Commit fe30c65

Browse files
committed
fix: 'defsite' shows up in Source views in ui
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 919dc78 commit fe30c65

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pdl-live-react/src/pdl_ast_utils.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ export function map_block_children(
3636
const input = f(block.input)
3737
block = { ...block, input: input }
3838
}
39-
return block
39+
// Remove `defsite` from context:
40+
return {
41+
...block,
42+
context: JSON.parse(
43+
JSON.stringify(block.context, (k, v) =>
44+
k === "defsite" ? undefined : v,
45+
),
46+
),
47+
}
4048
})
4149
.with({ kind: "code" }, (block) => {
4250
const code = f(block.code)

0 commit comments

Comments
 (0)