Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Nov 14, 2023
1 parent 3985f65 commit 85253be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ beforeEach(() => {
delete (window as any).foo
})

describe('getInitializedAnalytics', () => {
describe(getInitializedAnalytics, () => {
it('should return the window.analytics object if the snippet user passes a stale reference', () => {
;(window as any).analytics = { initialized: true }
const analytics = [] as any
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { AnyAnalytics, MaybeInitializedAnalytics } from '../../types'

/**
* Get possibly-initialized analytics.
*
* Reason:
* There is a known bug for people who attempt to to wrap the library: the analytics reference does not get updated when the analytics.js library loads.
* Thus, we need to proxy events to the global reference instead.
*
Expand Down

0 comments on commit 85253be

Please sign in to comment.