1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: use correct baseUriPath with localStorage

This commit is contained in:
Ivar Conradi Østhus 2021-05-05 10:57:07 +02:00
parent 5585645999
commit 3e2ed0b42c
2 changed files with 6 additions and 2 deletions

View File

@ -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: {} });

View File

@ -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({