diff --git a/frontend/src/store/settings/index.js b/frontend/src/store/settings/index.js index 52a1d01644..a59ef68cbb 100644 --- a/frontend/src/store/settings/index.js +++ b/frontend/src/store/settings/index.js @@ -2,11 +2,13 @@ import { fromJS } from 'immutable'; import { UPDATE_SETTING } from './actions'; import { USER_LOGOUT, USER_LOGIN } from '../user/actions'; +import { getBasePath } from '../../utils/format-path'; + const localStorage = window.localStorage || { setItem: () => {}, getItem: () => {}, }; -const basePath = location ? location.pathname : '/'; +const basePath =  getBasePath(); const SETTINGS = `${basePath}:settings`; const DEFAULT = fromJS({ location: {} }); diff --git a/frontend/src/store/ui-config/index.js b/frontend/src/store/ui-config/index.js index 4852de5628..1aa3f6e4ce 100644 --- a/frontend/src/store/ui-config/index.js +++ b/frontend/src/store/ui-config/index.js @@ -1,12 +1,14 @@ import { Map as $Map } from 'immutable'; import { RECEIVE_CONFIG } from './actions'; +import { getBasePath } from '../../utils/format-path'; + const localStorage = window.localStorage || { setItem: () => {}, getItem: () => {}, }; -const basePath = location ? location.pathname : '/'; +const basePath =  getBasePath(); const UI_CONFIG = `${basePath}:ui_config`; const DEFAULT = new $Map({