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
|
@ -12,6 +12,7 @@ import {
|
|||
} from '../environment';
|
||||
import { strictAssert } from '../util/assert';
|
||||
import { createSetting } from '../util/preload';
|
||||
import { initialize as initializeLogging } from '../logging/set_up_renderer_logging';
|
||||
|
||||
const config = url.parse(window.location.toString(), true).query;
|
||||
const { locale } = config;
|
||||
|
@ -23,6 +24,8 @@ setEnvironment(parseEnvironment(config.environment));
|
|||
|
||||
strictAssert(Boolean(window.SignalContext), 'context must be defined');
|
||||
|
||||
initializeLogging();
|
||||
|
||||
export const SignalWindow = {
|
||||
Settings: {
|
||||
themeSetting: createSetting('themeSetting', { setter: false }),
|
||||
|
@ -34,4 +37,5 @@ export const SignalWindow = {
|
|||
getEnvironment,
|
||||
getVersion: (): string => String(config.version),
|
||||
i18n: setupI18n(locale, localeMessages),
|
||||
log: window.SignalWindow.log,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue