posthog-js-lite 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  export declare type PostHogCoreOptions = {
2
- /** PostHog API host, usually 'https://app.posthog.com' or 'https://eu.posthog.com' */
2
+ /** PostHog API host, usually 'https://us.i.posthog.com' or 'https://eu.i.posthog.com' */
3
3
  host?: string;
4
4
  /** The number of events to queue before sending to PostHog (flushing) */
5
5
  flushAt?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-js-lite",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "main": "lib/index.cjs.js",
5
5
  "module": "lib/index.esm.js",
6
6
  "types": "lib/index.d.ts",
package/src/storage.ts CHANGED
@@ -145,7 +145,7 @@ const createMemoryStorage = (): PostHogStorage => {
145
145
 
146
146
  export const getStorage = (type: PostHogOptions['persistence'], window: Window | undefined): PostHogStorage => {
147
147
  if (window) {
148
- if (!localStorage) {
148
+ if (!localStore) {
149
149
  const _localStore = createStorageLike(window.localStorage)
150
150
  localStore = checkStoreIsSupported(_localStore) ? _localStore : undefined
151
151
  }
@@ -61,7 +61,7 @@ describe('PostHogWeb', () => {
61
61
 
62
62
  await waitForPromises()
63
63
 
64
- expect(fetch).toHaveBeenCalledWith('https://app.posthog.com/decide/?v=3', {
64
+ expect(fetch).toHaveBeenCalledWith('https://us.i.posthog.com/decide/?v=3', {
65
65
  body: JSON.stringify({
66
66
  token: 'TEST_API_KEY',
67
67
  distinct_id: posthog.getDistinctId(),