mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 10:15:26 +00:00
fix: avoid writing mobx data to localforage
This commit is contained in:
@@ -104,7 +104,10 @@ export default class State {
|
|||||||
*/
|
*/
|
||||||
async save() {
|
async save() {
|
||||||
for (const [id, store] of this.persistent) {
|
for (const [id, store] of this.persistent) {
|
||||||
await localforage.setItem(id, store.toJSON());
|
await localforage.setItem(
|
||||||
|
id,
|
||||||
|
JSON.parse(stringify(store.toJSON())),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user