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