forked from AkkomaGang/akkoma-fe
fix settings not persisting
This commit is contained in:
parent
d815f984fb
commit
a97c07bfdf
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
import merge from 'lodash.merge'
|
||||
import localforage from 'localforage'
|
||||
import { each, get, set } from 'lodash'
|
||||
import { each, get, set, cloneDeep } from 'lodash'
|
||||
|
||||
let loaded = false
|
||||
|
||||
|
@ -69,7 +69,7 @@ export default function createPersistedState ({
|
|||
subscriber(store)((mutation, state) => {
|
||||
try {
|
||||
if (saveImmedeatelyActions.includes(mutation.type)) {
|
||||
setState(key, reducer(state, paths), storage)
|
||||
setState(key, reducer(cloneDeep(state), paths), storage)
|
||||
.then(success => {
|
||||
if (typeof success !== 'undefined') {
|
||||
if (mutation.type === 'setOption' || mutation.type === 'setCurrentUser') {
|
||||
|
|
Loading…
Reference in a new issue