Skip to content

Commit

Permalink
fix: disable background refresh when realtime is disabled (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajwootto authored Aug 15, 2024
1 parent 512e82b commit 3f6a29c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/js/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export class DevCycleClient<
this.eventQueue = new EventQueue(sdkKey, this, options)

this.eventEmitter = new EventEmitter()
this.registerVisibilityChangeHandler()
if (!this.options.disableRealtimeUpdates) {
this.registerVisibilityChangeHandler()
}

this.onInitialized = new Promise((resolve, reject) => {
this.settleOnInitialized = (value, error) => {
Expand Down

0 comments on commit 3f6a29c

Please sign in to comment.