mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-09 10:13:42 +00:00
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