forked from abner/for-legacy-web
Fix: Defaults / dayjs will not always be present.
This commit is contained in:
1 parent
841320aab7
commit
8e0e226ec6
1 file changed
+1
-1
@@ -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 ?? '/';
|
||||
|
||||
Reference in new issue
Block a user