mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-05 03:25:10 +08:00
fix(core): location.state maybe null (#4203)
This commit is contained in:
@@ -29,14 +29,16 @@ export const Component = () => {
|
||||
await onceSignedIn();
|
||||
setAuthAtom(prev => ({ ...prev, onceSignedIn: undefined }));
|
||||
}
|
||||
if (location.state.callbackURL) {
|
||||
if (location.state?.callbackURL) {
|
||||
navigate(location.state.callbackURL, {
|
||||
replace: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
afterSignedIn();
|
||||
afterSignedIn().catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
}, [
|
||||
location.state.callbackURL,
|
||||
loginStatus,
|
||||
|
||||
Reference in New Issue
Block a user