Skip to content

Commit 5ecdf00

Browse files
[8.x] fix `Cannot read properties of null (reading 'closed')` when chrome is remounted (elastic#210075) (elastic#210100)
# Backport This will backport the following commits from `main` to `8.x`: - [fix &#x60;Cannot read properties of null (reading &#x27;closed&#x27;)&#x60; when chrome is remounted (elastic#210075)](elastic#210075) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Anton Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-06T19:02:59Z","message":"fix `Cannot read properties of null (reading 'closed')` when chrome is remounted (elastic#210075)","sha":"cd398d939462ebeb73f05c4fdd1d88db349eacf8","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:prev-major","v9.1.0"],"title":"fix `Cannot read properties of null (reading 'closed')` when chrome is remounted ","number":210075,"url":"https://github.com/elastic/kibana/pull/210075","mergeCommit":{"message":"fix `Cannot read properties of null (reading 'closed')` when chrome is remounted (elastic#210075)","sha":"cd398d939462ebeb73f05c4fdd1d88db349eacf8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210075","number":210075,"mergeCommit":{"message":"fix `Cannot read properties of null (reading 'closed')` when chrome is remounted (elastic#210075)","sha":"cd398d939462ebeb73f05c4fdd1d88db349eacf8"}}]}] BACKPORT--> Co-authored-by: Anton Dosov <[email protected]>
1 parent c465502 commit 5ecdf00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/solutions/observability/plugins/observability_ai_assistant_app/public/hooks/is_nav_control_visible.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function useIsNavControlVisible({ coreStart, pluginsStart }: UseIsNavCont
5555
},
5656
});
5757

58-
return appSubscription.unsubscribe;
58+
return () => appSubscription.unsubscribe();
5959
}, [currentAppId$, applications$, aiAssistantManagementSelection.aiAssistantType$]);
6060

6161
return {

0 commit comments

Comments
 (0)