Skip to content

Commit

Permalink
Do not load toobar only if autocapture enabled (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra authored Sep 14, 2021
1 parent aaed37f commit a7991ce
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions src/__tests__/autocapture.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,12 +897,6 @@ describe('Autocapture system', () => {

jest.spyOn(autocapture, '_addDomEventHandlers')
})

it('should check whether to load the editor', () => {
given.subject()

expect(given.lib.toolbar.maybeLoadEditor).toHaveBeenCalled()
})
})

describe('afterDecideResponse()', () => {
Expand Down
1 change: 0 additions & 1 deletion src/autocapture.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ var autocapture = {

_customProperties: {},
init: function (instance) {
instance.toolbar.maybeLoadEditor()
this.rageclicks = new RageClick(instance)
},

Expand Down
1 change: 1 addition & 0 deletions src/posthog-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ var create_mplib = function (token, config, name) {
instance.feature_flags = instance.featureFlags

instance.toolbar = new Toolbar(instance)
instance.toolbar.maybeLoadEditor()

instance.sessionRecording = new SessionRecording(instance)
instance.sessionRecording.startRecordingIfEnabled()
Expand Down

0 comments on commit a7991ce

Please sign in to comment.