From d0b5c2f3077d7b497ee4414fe43a66cf67ce2fca Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Tue, 22 Oct 2024 12:23:47 +0100 Subject: [PATCH] Avoid sending `ide-open-view-null-once` event (#21247) GitOrigin-RevId: 2f46fe26561bfa2eca36ad605cdd217514aba09d --- .../js/features/ide-react/hooks/use-layout-event-tracking.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/ide-react/hooks/use-layout-event-tracking.ts b/services/web/frontend/js/features/ide-react/hooks/use-layout-event-tracking.ts index a1031950e9..6dec0c23d9 100644 --- a/services/web/frontend/js/features/ide-react/hooks/use-layout-event-tracking.ts +++ b/services/web/frontend/js/features/ide-react/hooks/use-layout-event-tracking.ts @@ -6,7 +6,7 @@ export function useLayoutEventTracking() { const { view, leftMenuShown, chatIsOpen } = useLayoutContext() useEffect(() => { - if (view !== 'editor' && view !== 'pdf') { + if (view && view !== 'editor' && view !== 'pdf') { sendMBOnce(`ide-open-view-${view}-once`) } }, [view])