Fix: Defaults / dayjs will not always be present.

pull/1049/head
Paul 2021-07-04 12:46:33 +01:00
parent 504f491074
commit 78d0abb592
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ function Locale({ children, locale }: Props) {
function transformLanguage(obj: { [key: string]: any }) {
const dayjs = obj.dayjs;
const defaults = dayjs.defaults;
const defaults = dayjs?.defaults;
const twelvehour = defaults?.twelvehour === 'yes' || true;
const separator: '/' | '-' | '.' = defaults?.date_separator ?? '/';