fix: handling of children

This commit is contained in:
Derrick Hammer 2023-10-12 14:21:23 -04:00
parent 9c218a44d6
commit d886b6f2d0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ const LumeDashboard = (props: any) => {
</button> </button>
</LumeDashboardTrigger> </LumeDashboardTrigger>
); );
const GivenTrigger = React.Children.toArray(children.children) const GivenTrigger = React.Children.toArray(
children?.children || (children as any) || [],
)
.filter((c) => { .filter((c) => {
if (typeof c === "object") { if (typeof c === "object") {
//@ts-expect-error -- I dont know what the type of this should be, i just know that this works //@ts-expect-error -- I dont know what the type of this should be, i just know that this works