Avoid sending ide-open-view-null-once event (#21247)

GitOrigin-RevId: 2f46fe26561bfa2eca36ad605cdd217514aba09d
This commit is contained in:
Alf Eaton 2024-10-22 12:23:47 +01:00 committed by Copybot
parent 98bf2ac055
commit d0b5c2f307

View file

@ -6,7 +6,7 @@ export function useLayoutEventTracking() {
const { view, leftMenuShown, chatIsOpen } = useLayoutContext() const { view, leftMenuShown, chatIsOpen } = useLayoutContext()
useEffect(() => { useEffect(() => {
if (view !== 'editor' && view !== 'pdf') { if (view && view !== 'editor' && view !== 'pdf') {
sendMBOnce(`ide-open-view-${view}-once`) sendMBOnce(`ide-open-view-${view}-once`)
} }
}, [view]) }, [view])