Skip to content

Commit

Permalink
fix(gjs): handle children prop as a Binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Dec 26, 2024
1 parent 9a7e40a commit d8664da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lang/gjs/src/_astal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ export function hook<Widget extends Connectable>(
export function construct<Widget extends Connectable & { [setChildren]: (children: any[]) => void }>(widget: Widget, config: any) {
const { setup, child, children = [], ...props } = config

if (children instanceof Binding) {
children = [children]
}

if (child) {
children.unshift(child)
}
Expand Down

0 comments on commit d8664da

Please sign in to comment.