Skip to content

Commit c13ed33

Browse files
Fix build (second attempt)
1 parent 01b622e commit c13ed33

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/components/segment-button/segment-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class SegmentButton implements ComponentInterface, ButtonInterface {
9191
const segmentContent = segmentView?.querySelector(
9292
`ion-segment-content[id="${contentId}"]`
9393
) as HTMLIonSegmentContentElement | null;
94-
if (segmentContent) {
94+
if (segmentContent && timeoutId) {
9595
clearTimeout(timeoutId); // Clear the timeout if the segmentContent is found
9696
cancelAnimationFrame(animationFrameId);
9797
resolve(segmentContent);

core/src/utils/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const transitionEndAsync = (el: HTMLElement | null, expectedDuration = 0)
2222
*/
2323
const transitionEnd = (el: HTMLElement | null, expectedDuration = 0, callback: (ev?: TransitionEvent) => void) => {
2424
let unRegTrans: (() => void) | undefined;
25-
let animationTimeout: NodeJS.Timeout | undefined;
25+
let animationTimeout: number | undefined;
2626
const opts: AddEventListenerOptions = { passive: true };
2727
const ANIMATION_FALLBACK_TIMEOUT = 500;
2828

0 commit comments

Comments
 (0)