Skip to content

Commit

Permalink
fix(gjs): filter undefined props
Browse files Browse the repository at this point in the history
close #151
  • Loading branch information
Aylur committed Dec 19, 2024
1 parent a60c44c commit 11425c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lang/gjs/src/gtk3/astalify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ export default function astalify<
const { setup, child, children = [], ...props } = config
props.visible ??= true

// remove undefined values
for (const [key, value] of Object.entries(props)) {
if (value === undefined) {
delete props[key]
}
}

if (child)
children.unshift(child)

Expand Down

0 comments on commit 11425c9

Please sign in to comment.