diff --git a/framework/core/js/src/common/Translator.tsx b/framework/core/js/src/common/Translator.tsx index 31e2040eba..951830fb79 100644 --- a/framework/core/js/src/common/Translator.tsx +++ b/framework/core/js/src/common/Translator.tsx @@ -99,14 +99,14 @@ export default class Translator { /** * Formats the time. - * + * * The format of the time will be chosen by the following order: * - The format ID defined in current locale. * - The provided fallback format. * - DayJS default format. */ formatDateTime(time: Dayjs, id?: string, fallback?: string): string { - const formatCallback = (id && this.dateTimeFormats.has(id)) && this.dateTimeFormats.get(id); + const formatCallback = id && this.dateTimeFormats.has(id) && this.dateTimeFormats.get(id); if (formatCallback) { const result = formatCallback(fallback); if (result) return result; diff --git a/framework/core/js/src/common/index.ts b/framework/core/js/src/common/index.ts index c3bff0978d..0b7deb7004 100644 --- a/framework/core/js/src/common/index.ts +++ b/framework/core/js/src/common/index.ts @@ -10,7 +10,7 @@ import 'bootstrap/js/transition'; import 'jquery.hotkeys/jquery.hotkeys'; import relativeTime from 'dayjs/plugin/relativeTime'; -import localizedFormat from "dayjs/plugin/localizedFormat"; +import localizedFormat from 'dayjs/plugin/localizedFormat'; dayjs.extend(relativeTime); dayjs.extend(localizedFormat);