Bugfix. Use init settings to check for test env
This commit is contained in:
parent
d3ab68011a
commit
4fd848ff3e
@ -4,7 +4,7 @@ import u from '@converse/headless/utils/core';
|
||||
import { CONNECTION_STATUS } from '@converse/headless/shared/constants';
|
||||
import { Router } from '@converse/skeletor/src/router.js';
|
||||
import { TimeoutError } from '@converse/headless/shared/errors';
|
||||
import { getAppSettings } from '@converse/headless/shared/settings';
|
||||
import { getInitSettings } from '@converse/headless/shared/settings';
|
||||
|
||||
|
||||
/**
|
||||
@ -77,7 +77,7 @@ const _converse = {
|
||||
TimeoutError: TimeoutError,
|
||||
|
||||
isTestEnv: () => {
|
||||
return getAppSettings()['bosh_service_url'] === 'montague.lit/http-bind';
|
||||
return getInitSettings()['bosh_service_url'] === 'montague.lit/http-bind';
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -63,6 +63,10 @@ export function initAppSettings (settings) {
|
||||
assignIn(app_settings, DEFAULT_SETTINGS, allowed_settings);
|
||||
}
|
||||
|
||||
export function getInitSettings () {
|
||||
return init_settings;
|
||||
}
|
||||
|
||||
export function getAppSetting (key) {
|
||||
if (Object.keys(DEFAULT_SETTINGS).includes(key)) {
|
||||
return app_settings[key];
|
||||
|
Loading…
Reference in New Issue
Block a user