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 d8fb72a commit a4d4294
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/heatmaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PostHog } from './posthog-core'

import { document, window } from './utils/globals'
import { getParentElement, isTag } from './autocapture-utils'
import { AUTOCAPTURE_DISABLED_SERVER_SIDE, HEATMAPS_ENABLED_SERVER_SIDE } from './constants'
import { HEATMAPS_ENABLED_SERVER_SIDE } from './constants'

type HeatmapEventBuffer =
| {
Expand Down Expand Up @@ -59,7 +59,11 @@ export class Heatmaps {
}

public get isEnabled(): boolean {
return !!this.instance.config.__preview_heatmaps || !!this._enabledServerSide
return (
!!this.instance.config.__preview_heatmaps ||
!!this._enabledServerSide ||
!!this.instance.persistence?.props[HEATMAPS_ENABLED_SERVER_SIDE]
)
}

public afterDecideResponse(response: DecideResponse) {
Expand Down

0 comments on commit a4d4294

Please sign in to comment.