Skip to content
Snippets Groups Projects
Commit d5fae8b9 authored by insert's avatar insert
Browse files

Fix: dayjs locales won't fully load if the locale isn't selected first.

parent d69b10ad
Branches
No related merge requests found
...@@ -195,11 +195,12 @@ function Locale({ children, locale }: Props) { ...@@ -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);
}, },
); );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment