fix: add optional chainging to i18n log in case the window object is not ready

pull/3206/head
Ryan Miller 1 year ago
parent 7d8ba9320e
commit 0611aba29f

@ -12,7 +12,7 @@ import { GetMessageArgs, LocalizerDictionary, LocalizerToken } from '../types/Lo
function i18nLog(message: string) { function i18nLog(message: string) {
// eslint:disable: no-console // eslint:disable: no-console
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
(window.log.error || console.log)(message); (window?.log?.error ?? console.log)(message);
} }
/** /**

Loading…
Cancel
Save