mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 21:48:48 +08:00
fix(core): location.state maybe null (#4203)
This commit is contained in:
@@ -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