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

Fix: Defaults / dayjs will not always be present.

parent 841320aa
Branches
No related merge requests found
...@@ -127,7 +127,7 @@ function Locale({ children, locale }: Props) { ...@@ -127,7 +127,7 @@ function Locale({ children, locale }: Props) {
function transformLanguage(obj: { [key: string]: any }) { function transformLanguage(obj: { [key: string]: any }) {
const dayjs = obj.dayjs; const dayjs = obj.dayjs;
const defaults = dayjs.defaults; const defaults = dayjs?.defaults;
const twelvehour = defaults?.twelvehour === 'yes' || true; const twelvehour = defaults?.twelvehour === 'yes' || true;
const separator: '/' | '-' | '.' = defaults?.date_separator ?? '/'; const separator: '/' | '-' | '.' = defaults?.date_separator ?? '/';
......
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