diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index 61dd0b713b..9f1cbc4d6c 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -596,7 +596,7 @@ export class Alert implements ComponentInterface, OverlayInterface { role={role} aria-modal="true" aria-labelledby={ariaLabelledBy} - aria-describedby={message ? msgId : null} + aria-describedby={message !== undefined ? msgId : null} tabindex="-1" {...(htmlAttributes as any)} style={{ diff --git a/core/src/components/datetime/utils/format.ts b/core/src/components/datetime/utils/format.ts index beddc2319f..3647a48310 100644 --- a/core/src/components/datetime/utils/format.ts +++ b/core/src/components/datetime/utils/format.ts @@ -145,7 +145,8 @@ export const getYear = (locale: string, refParts: DatetimeParts) => { }; const getNormalizedDate = (refParts: DatetimeParts) => { - const timeString = !!refParts.hour && !!refParts.minute ? ` ${refParts.hour}:${refParts.minute}` : ''; + const timeString = + refParts.hour !== undefined && refParts.minute !== undefined ? ` ${refParts.hour}:${refParts.minute}` : ''; return new Date(`${refParts.month}/${refParts.day}/${refParts.year}${timeString} GMT+0000`); }; diff --git a/core/src/utils/test/playwright/matchers/toHaveReceivedEventTimes.ts b/core/src/utils/test/playwright/matchers/toHaveReceivedEventTimes.ts index 1484c6a791..2b8c2c39a9 100644 --- a/core/src/utils/test/playwright/matchers/toHaveReceivedEventTimes.ts +++ b/core/src/utils/test/playwright/matchers/toHaveReceivedEventTimes.ts @@ -1,6 +1,7 @@ import type { EventSpy } from '../page/event-spy'; export function toHaveReceivedEventTimes(eventSpy: EventSpy, count: number) { + // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!eventSpy) { return { message: () => `toHaveReceivedEventTimes event spy is null`,