You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
485 B
12 lines
485 B
import { KEY_PREFIX } from './constants'; |
|
export default function purgeStoredState(config) { |
|
var storage = config.storage; |
|
var storageKey = "".concat(config.keyPrefix !== undefined ? config.keyPrefix : KEY_PREFIX).concat(config.key); |
|
return storage.removeItem(storageKey, warnIfRemoveError); |
|
} |
|
|
|
function warnIfRemoveError(err) { |
|
if (err && process.env.NODE_ENV !== 'production') { |
|
console.error('redux-persist/purgeStoredState: Error purging data stored state', err); |
|
} |
|
} |