fix(core): location.state maybe null (#4203)
This commit is contained in:
1 parent
ff808881ee
commit
6af7aefe00
1 file changed
+4
-2
@@ -29,14 +29,16 @@ export const Component = () => {
|
|||||||
await onceSignedIn();
|
await onceSignedIn();
|
||||||
setAuthAtom(prev => ({ ...prev, onceSignedIn: undefined }));
|
setAuthAtom(prev => ({ ...prev, onceSignedIn: undefined }));
|
||||||
}
|
}
|
||||||
if (location.state.callbackURL) {
|
if (location.state?.callbackURL) {
|
||||||
navigate(location.state.callbackURL, {
|
navigate(location.state.callbackURL, {
|
||||||
replace: true,
|
replace: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
afterSignedIn();
|
afterSignedIn().catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
}, [
|
}, [
|
||||||
location.state.callbackURL,
|
location.state.callbackURL,
|
||||||
loginStatus,
|
loginStatus,
|
||||||
|
|||||||
Reference in new issue
Block a user