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

This commit is contained in:
LongYinan authored and GitHub committed 2023-09-06 10:15:46 -07:00
1 parent 264d33823b
commit b8e3e4994e
1 file changed
+2 -2
+2 -2
View File
@@ -9,7 +9,7 @@ import { AuthPanel } from '../components/affine/auth';
import { useCurrentLoginStatus } from '../hooks/affine/use-current-login-status'; import { useCurrentLoginStatus } from '../hooks/affine/use-current-login-status';
interface LocationState { interface LocationState {
state: { state?: {
callbackURL?: string; callbackURL?: string;
}; };
} }
@@ -40,7 +40,7 @@ export const Component = () => {
console.error(err); console.error(err);
}); });
}, [ }, [
location.state.callbackURL, location.state?.callbackURL,
loginStatus, loginStatus,
navigate, navigate,
onceSignedIn, onceSignedIn,