Fix comment creation bug (#371)

This commit is contained in:
Charles Bochet
2023-06-24 11:18:13 -07:00
committed by GitHub
parent 31145c5518
commit 9c21975d2b
5 changed files with 21 additions and 19 deletions

View File

@ -7,7 +7,7 @@ const cookieStorageEffect =
(key: string): AtomEffect<AuthTokenPair | null> =>
({ setSelf, onSet }) => {
const savedValue = cookieStorage.getItem(key);
if (savedValue != null) {
if (savedValue != null && JSON.parse(savedValue)['accessToken']) {
setSelf(JSON.parse(savedValue));
}