Skip to content

Commit

Permalink
Fix storage
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Sep 18, 2024
1 parent ee53bb0 commit 50d2170
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/analytics/modules/analytics/client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineWxtPlugin } from 'wxt/sandbox';
import { storage } from 'wxt/storage';
import { useAppConfig } from 'wxt/client';
import { browser } from 'wxt/browser';
import {
Analytics,
AnalyticsConfig,
Expand All @@ -9,7 +10,6 @@ import {
BaseAnalyticsEvent,
} from './types';
import uaParser from 'ua-parser-js';
import { browser } from 'wxt/browser';

export let analytics: Analytics;
const ANALYTICS_PORT = 'wxt-analytics';
Expand Down Expand Up @@ -86,7 +86,9 @@ function createAnalyticsForwarder(): Analytics {
* background, and for reporting forwarded events from the other contexts.
*/
function createBackgroundAnalytics(): Analytics {
const config = useAppConfig().analytics as AnalyticsConfig | undefined;
const config = (useAppConfig() as any).analytics as
| AnalyticsConfig
| undefined;

// User properties storage
const userIdStorage =
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wxt-dev/analytics",
"version": "0.1.3",
"version": "0.1.4",
"description": "Add analytics to your web extension",
"repository": {
"type": "git",
Expand Down

0 comments on commit 50d2170

Please sign in to comment.