From 0f456f1bfe18982ae2790a7b44ca11ee9c38b497 Mon Sep 17 00:00:00 2001 From: Pete Harverson Date: Fri, 21 Aug 2020 09:25:17 +0100 Subject: [PATCH] [ML] Transforms: Unset doc title when app unmounts (#75539) Co-authored-by: Elastic Machine --- .../transform/public/app/mount_management_section.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/transform/public/app/mount_management_section.ts b/x-pack/plugins/transform/public/app/mount_management_section.ts index 454738f7a313a..0392ecbafa832 100644 --- a/x-pack/plugins/transform/public/app/mount_management_section.ts +++ b/x-pack/plugins/transform/public/app/mount_management_section.ts @@ -49,5 +49,10 @@ export async function mountManagementSection( history, }; - return renderApp(element, appDependencies); + const unmountAppCallback = renderApp(element, appDependencies); + + return () => { + docTitle.reset(); + unmountAppCallback(); + }; }