--fix
This commit is contained in:
parent
0cbfcb99a9
commit
fddb531ed2
133 changed files with 507 additions and 448 deletions
|
|
@ -5,10 +5,12 @@ import { each, get, set, cloneDeep } from 'lodash'
|
|||
let loaded = false
|
||||
|
||||
const defaultReducer = (state, paths) => (
|
||||
paths.length === 0 ? state : paths.reduce((substate, path) => {
|
||||
set(substate, path, get(state, path))
|
||||
return substate
|
||||
}, {})
|
||||
paths.length === 0
|
||||
? state
|
||||
: paths.reduce((substate, path) => {
|
||||
set(substate, path, get(state, path))
|
||||
return substate
|
||||
}, {})
|
||||
)
|
||||
|
||||
const saveImmedeatelyActions = [
|
||||
|
|
@ -30,7 +32,7 @@ export default function createPersistedState ({
|
|||
key = 'vuex-lz',
|
||||
paths = [],
|
||||
getState = (key, storage) => {
|
||||
let value = storage.getItem(key)
|
||||
const value = storage.getItem(key)
|
||||
return value
|
||||
},
|
||||
setState = (key, state, storage) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue