mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Fix: Defaults / dayjs will not always be present.
This commit is contained in:
@@ -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 ?? '/';
|
||||||
|
|||||||
Reference in New Issue
Block a user