PersistedState: Replace object-path with lodash function
We were loading that one anyway.
This commit is contained in:
parent
8d7d4980b9
commit
178ff1672d
2 changed files with 2 additions and 4 deletions
|
@ -1,13 +1,12 @@
|
|||
import merge from 'lodash.merge'
|
||||
import objectPath from 'object-path'
|
||||
import localforage from 'localforage'
|
||||
import { each } from 'lodash'
|
||||
import { each, get, set } from 'lodash'
|
||||
|
||||
let loaded = false
|
||||
|
||||
const defaultReducer = (state, paths) => (
|
||||
paths.length === 0 ? state : paths.reduce((substate, path) => {
|
||||
objectPath.set(substate, path, objectPath.get(state, path))
|
||||
set(substate, path, get(state, path))
|
||||
return substate
|
||||
}, {})
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue