From 2aaf2e8c1ed737366f0b5b4181300c9a4ea80485 Mon Sep 17 00:00:00 2001 From: goenning Date: Wed, 20 Sep 2023 10:12:45 +0100 Subject: [PATCH] Fixed an issue with client-side checking --- package-lock.json | 2 +- packages/react/CHANGELOG.md | 4 ++++ packages/react/package.json | 2 +- packages/react/src/index.tsx | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 949e201..2aea31f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13333,7 +13333,7 @@ }, "packages/react": { "name": "@aptabase/react", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "dependencies": { "@aptabase/web": "0.2.0" diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 35146c1..7ddb784 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.2 + +- Fixed an issue with client-side checking + ## 0.1.1 - Remove warning log from Server Side Rendering diff --git a/packages/react/package.json b/packages/react/package.json index e52056a..235b086 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@aptabase/react", - "version": "0.1.1", + "version": "0.1.2", "type": "module", "description": "React SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps", "main": "./dist/index.cjs", diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsx index c0df156..6cd05a6 100644 --- a/packages/react/src/index.tsx +++ b/packages/react/src/index.tsx @@ -33,7 +33,7 @@ export function AptabaseProvider({ appKey, options, children }: Props) { export function useAptabase(): AptabaseClient { const ctx = useContext(AptabaseContext); - if (typeof window !== 'undefined') { + if (typeof window === 'undefined') { return { trackEvent: (eventName: string) => { console.warn(