Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Apr 24, 2024
1 parent 0b58c99 commit c5d1b03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/heatmaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ function elementOrParentPositionMatches(el: Element, matches: string[], breakOnE
const TOOLBAR_ID = '__POSTHOG_TOOLBAR__'

function elementInToolbar(el: Element): boolean {
return el.id === TOOLBAR_ID || !!el.closest('#__POSTHOG_TOOLBAR__')
// NOTE: .closest is not supported in IE11 hence the operator check
return el.id === TOOLBAR_ID || !!el.closest?.('#__POSTHOG_TOOLBAR__')
}

export class Heatmaps {
Expand Down

0 comments on commit c5d1b03

Please sign in to comment.