mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
fix: namespace settings in localStorage
This commit is contained in:
parent
9e9b2ffe6a
commit
6387b2d8f0
@ -2,9 +2,12 @@ import { fromJS } from 'immutable';
|
|||||||
import { UPDATE_SETTING } from './actions';
|
import { UPDATE_SETTING } from './actions';
|
||||||
import { USER_LOGOUT, USER_LOGIN } from '../user/actions';
|
import { USER_LOGOUT, USER_LOGIN } from '../user/actions';
|
||||||
|
|
||||||
// TODO: provde a mock if localstorage does not exists?
|
const localStorage = window.localStorage || {
|
||||||
const localStorage = window.localStorage || {};
|
setItem: () => {},
|
||||||
const SETTINGS = 'settings';
|
getItem: () => {},
|
||||||
|
};
|
||||||
|
const basePath = location ? location.pathname : '/';
|
||||||
|
const SETTINGS = `${basePath}:settings`;
|
||||||
|
|
||||||
const DEFAULT = fromJS({});
|
const DEFAULT = fromJS({});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user