Ensure that both window and SignalWindow are defined
This commit is contained in:
parent
e86a6119cd
commit
1b9d8dcb11
4 changed files with 5 additions and 8 deletions
|
@ -17,8 +17,7 @@ export function setupI18n(
|
|||
|
||||
const getMessage: LocalizerType = (key, substitutions) => {
|
||||
// eslint-disable-next-line no-console
|
||||
const log =
|
||||
typeof window !== 'undefined' ? window.SignalWindow.log : console;
|
||||
const log = window?.SignalWindow?.log || console;
|
||||
|
||||
const entry = messages[key];
|
||||
if (!entry) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue