diff --git a/src/heatmaps.ts b/src/heatmaps.ts index ecb645a2f..29469d4f7 100644 --- a/src/heatmaps.ts +++ b/src/heatmaps.ts @@ -34,7 +34,7 @@ const TOOLBAR_ID = '__POSTHOG_TOOLBAR__' function elementInToolbar(el: Element): boolean { // NOTE: .closest is not supported in IE11 hence the operator check - return el.id === TOOLBAR_ID || !!el.closest?.('#__POSTHOG_TOOLBAR__') + return el.id === TOOLBAR_ID || !!el.closest?.('#' + TOOLBAR_ID) } export class Heatmaps {