Skip to content

Commit 1765a8d

Browse files
committed
Fix UI
Signed-off-by: Louis Mandel <[email protected]>
1 parent e9c1988 commit 1765a8d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pdl-live-react/src/pdl_ast_utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function map_block_children(
4747
}
4848
// @ts-expect-error: TODO
4949
new_block = match(new_block)
50-
// .with(P.string, s => s)
50+
.with(P.union(P.nullish, P.boolean, P.number, P.string), (v) => v)
5151
.with({ kind: "empty" }, (block) => block)
5252
.with({ kind: "function" }, (block) => {
5353
const return_ = f_block(block.return)
@@ -202,6 +202,7 @@ export function map_block_children(
202202
})
203203
.with({ kind: "include" }, (block) => block)
204204
.with({ kind: "import" }, (block) => block)
205+
.with({ kind: "aggregator" }, (block) => block)
205206
.with({ kind: undefined }, (block) => block)
206207
.exhaustive()
207208
match(new_block)
@@ -293,6 +294,7 @@ export function iter_block_children(
293294
.with({ kind: "read" }, () => {})
294295
.with({ kind: "include" }, () => {})
295296
.with({ kind: "import" }, () => {})
297+
.with({ kind: "aggregator" }, () => {})
296298
.with({ kind: undefined }, () => {})
297299
.exhaustive()
298300
match(block)

pdl-live-react/src/view/timeline/model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export function childrenOf(block: NonScalarPdlBlock) {
135135
.with({ kind: "read" }, (data) => [data.pdl__result])
136136
.with({ kind: "include" }, (data) => [data.pdl__trace ?? data.pdl__result])
137137
.with({ kind: "import" }, (data) => [data.pdl__trace ?? data.pdl__result])
138+
.with({ kind: "aggregator" }, () => [])
138139
.with({ kind: "function" }, () => [])
139140
.with({ kind: "call" }, (data) => [data.pdl__trace ?? data.pdl__result])
140141
.with({ kind: "text" }, (data) => [data.text])

0 commit comments

Comments
 (0)