PersistedState: Replace object-path with lodash function

We were loading that one anyway.
This commit is contained in:
lain 2020-06-11 18:44:45 +02:00
parent 8d7d4980b9
commit 178ff1672d
2 changed files with 2 additions and 4 deletions

View file

@ -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
}, {})
)