mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +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 { USER_LOGOUT, USER_LOGIN } from '../user/actions';
|
||||
|
||||
// TODO: provde a mock if localstorage does not exists?
|
||||
const localStorage = window.localStorage || {};
|
||||
const SETTINGS = 'settings';
|
||||
const localStorage = window.localStorage || {
|
||||
setItem: () => {},
|
||||
getItem: () => {},
|
||||
};
|
||||
const basePath = location ? location.pathname : '/';
|
||||
const SETTINGS = `${basePath}:settings`;
|
||||
|
||||
const DEFAULT = fromJS({});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user