| ... | @@ -127,8 +127,10 @@ function EventRouter() { | ... | @@ -127,8 +127,10 @@ function EventRouter() { |
| 127 | const queryClient = useQueryClient(); | 127 | const queryClient = useQueryClient(); |
| 128 | const navigate = useNavigate(); | 128 | const navigate = useNavigate(); |
| 129 | const pathname = useRouterState({ select: (state) => state.location.pathname }); | 129 | const pathname = useRouterState({ select: (state) => state.location.pathname }); |
| | 130 | const pathnameRef = useRef(pathname); |
| 130 | const lastConfigIssuesSignatureRef = useRef<string | null>(null); | 131 | const lastConfigIssuesSignatureRef = useRef<string | null>(null); |
| 131 | const handledBootstrapThreadIdRef = useRef<string | null>(null); | 132 | const handledBootstrapThreadIdRef = useRef<string | null>(null); |
| | 133 | pathnameRef.current = pathname; |
| 132 | | 134 | |
| 133 | useEffect(() => { | 135 | useEffect(() => { |
| 134 | const api = readNativeApi(); | 136 | const api = readNativeApi(); |
| ... | @@ -201,7 +203,7 @@ function EventRouter() { | ... | @@ -201,7 +203,7 @@ function EventRouter() { |
| 201 | projectId: payload.bootstrapProjectId, | 203 | projectId: payload.bootstrapProjectId, |
| 202 | expanded: true, | 204 | expanded: true, |
| 203 | }); | 205 | }); |
| 204 | if (pathname !== "/") { | 206 | if (pathnameRef.current !== "/") { |
| 205 | return; | 207 | return; |
| 206 | } | 208 | } |
| 207 | if (handledBootstrapThreadIdRef.current === payload.bootstrapThreadId) { | 209 | if (handledBootstrapThreadIdRef.current === payload.bootstrapThreadId) { |
| ... | @@ -264,7 +266,7 @@ function EventRouter() { | ... | @@ -264,7 +266,7 @@ function EventRouter() { |
| 264 | unsubWelcome(); | 266 | unsubWelcome(); |
| 265 | unsubServerConfigUpdated(); | 267 | unsubServerConfigUpdated(); |
| 266 | }; | 268 | }; |
| 267 | }, [dispatch, navigate, pathname, queryClient]); | 269 | }, [dispatch, navigate, queryClient]); |
| 268 | | 270 | |
| 269 | return null; | 271 | return null; |
| 270 | } | 272 | } |