Skip to content

Commit 49c3202

Browse files
committed
fix(core): empty array check
1 parent d605a41 commit 49c3202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/pfe-core/controllers/slot-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export class SlotController implements ReactiveController {
152152
if (isServer) {
153153
return [];
154154
} else if (this.#nodes.has(name)) {
155-
return this.#nodes.get(name)!.slot?.assignedElements?.() as T[];
155+
return (this.#nodes.get(name)!.slot?.assignedElements?.() ?? []) as T[];
156156
} else {
157157
const children = Array.from(this.host.children) as T[];
158158
return children.filter(isSlot(name));

0 commit comments

Comments
 (0)