fix(core): location.state maybe null (#4236)
This commit is contained in:
1 parent
264d33823b
commit
b8e3e4994e
1 file changed
+2
-2
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user