From 1acf505af85fae5260359e59e4696abf39ed1675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 3 Nov 2024 20:18:07 +0100 Subject: [PATCH] pl-fe: Fix persistAuth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/reducers/auth.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/pl-fe/src/reducers/auth.ts b/packages/pl-fe/src/reducers/auth.ts index af5af73d4..14675226e 100644 --- a/packages/pl-fe/src/reducers/auth.ts +++ b/packages/pl-fe/src/reducers/auth.ts @@ -145,7 +145,10 @@ const sanitizeState = (state: State) => { }); }; -const persistAuth = (state: State) => localStorage.setItem(STORAGE_KEY, JSON.stringify(state.delete('client').toJS())); +const persistAuth = (state: State) => { + const { client, ...data } = state.toJS(); + localStorage.setItem(STORAGE_KEY, JSON.stringify(data)); +}; const persistSession = (state: State) => { const me = state.me;