diff --git a/core/src/components/segment-view/segment-view.tsx b/core/src/components/segment-view/segment-view.tsx index 96389d8b2d..d3bcd2e382 100644 --- a/core/src/components/segment-view/segment-view.tsx +++ b/core/src/components/segment-view/segment-view.tsx @@ -54,7 +54,7 @@ export class SegmentView implements ComponentInterface { }); }; - private getSegmentButtons(): HTMLIonSegmentButtonElement[] | [] { + private getSegmentButtons(): HTMLIonSegmentButtonElement[] { const { segmentEl } = this; if (!segmentEl) { diff --git a/core/src/components/segment/segment.tsx b/core/src/components/segment/segment.tsx index 08ded86aa3..01f1fcd1b8 100644 --- a/core/src/components/segment/segment.tsx +++ b/core/src/components/segment/segment.tsx @@ -220,7 +220,7 @@ export class Segment implements ComponentInterface { this.ionChange.emit({ value }); } - private getButtons(): HTMLIonSegmentButtonElement[] | [] { + private getButtons(): HTMLIonSegmentButtonElement[] { return Array.from(this.el.querySelectorAll('ion-segment-button')); }