I just transitioned an old project to a new version of Svelte, with .TS and all the other upgrades I can think of., and I'm getting unusual references in my localStorage and sessionStorage instead of actual data.
This is my store.ts
import { persist, createLocalStorage, createSessionStorage } from '@macfja/svelte-persistent-store';
import type { PersistentStore } from '@macfja/svelte-persistent-store';
import { writable } from 'svelte/store';
type user = {
username: string;
};
type error = {
status: boolean;
message: string;
};
class CapripolStore {
constructor(
public transitionUser: PersistentStore<object> = persist(writable([]), createSessionStorage(), 'transitionUser'),
public user: PersistentStore<user> = persist(writable(<user>({})), createSessionStorage(), 'user'),
public mfa: PersistentStore<boolean> = persist(writable(false), createSessionStorage(), 'mfa'),
public signupConfirm: PersistentStore<boolean> = persist(writable(false), createSessionStorage(), 'signupConfirm'),
public passwordReset: PersistentStore<boolean> = persist(writable(false), createSessionStorage(), 'passwordReset'),
public error: PersistentStore<error> = persist(writable(<error>({})), createSessionStorage(), 'error'),
) {}
}
export const capripolStore = new CapripolStore();
When I look at the values of everything, transitionUser, user, and error, are all ["#$@__reference__0"]
For some reason, signupConfirm, passwordReset, and mfa are all fine. Not sure what's going on here.
I just transitioned an old project to a new version of Svelte, with .TS and all the other upgrades I can think of., and I'm getting unusual references in my localStorage and sessionStorage instead of actual data.
This is my store.ts
When I look at the values of everything, transitionUser, user, and error, are all
["#$@__reference__0"]For some reason, signupConfirm, passwordReset, and mfa are all fine. Not sure what's going on here.