mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
Fix: dayjs locales won't fully load if the locale isn't selected first.
This commit is contained in:
@@ -195,11 +195,12 @@ function Locale({ children, locale }: Props) {
|
|||||||
`../../node_modules/dayjs/esm/locale/${target}.js`
|
`../../node_modules/dayjs/esm/locale/${target}.js`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
dayjs.locale(target, dayjs_locale.default);
|
||||||
|
|
||||||
if (defn.dayjs) {
|
if (defn.dayjs) {
|
||||||
dayjs.updateLocale(target, { calendar: defn.dayjs });
|
dayjs.updateLocale(target, { calendar: defn.dayjs });
|
||||||
}
|
}
|
||||||
|
|
||||||
dayjs.locale(target, dayjs_locale.default);
|
|
||||||
setDefinition(defn);
|
setDefinition(defn);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user