fix(core): location.state maybe null (#4236)

This commit is contained in:
LongYinan
2023-09-06 10:15:46 -07:00
committed by GitHub
parent 264d33823b
commit b8e3e4994e

View File

@@ -9,7 +9,7 @@ import { AuthPanel } from '../components/affine/auth';
import { useCurrentLoginStatus } from '../hooks/affine/use-current-login-status';
interface LocationState {
state: {
state?: {
callbackURL?: string;
};
}
@@ -40,7 +40,7 @@ export const Component = () => {
console.error(err);
});
}, [
location.state.callbackURL,
location.state?.callbackURL,
loginStatus,
navigate,
onceSignedIn,