Skip to content

Commit f7dc47f

Browse files
Update core/src/components/toolbar/toolbar.tsx
Co-authored-by: Brandy Smith <[email protected]>
1 parent e5c643b commit f7dc47f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

core/src/components/toolbar/toolbar.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ export class Toolbar implements ComponentInterface {
112112

113113
private hasSlotContent(slotName: string): boolean {
114114
const slotNode = this.el.shadowRoot?.querySelector(`slot[name="${slotName}"]`) as HTMLSlotElement | null;
115-
if (slotNode) {
116-
const assigned = slotNode.assignedNodes();
117-
return assigned.length > 0;
118-
}
119-
return false;
115+
return !!slotNode && slotNode.assignedNodes().length > 0;
120116
}
121117

122118
@Listen('ionStyle')

0 commit comments

Comments
 (0)