From 90e0966c52c578d68fada5bd49ace900f306d02f Mon Sep 17 00:00:00 2001 From: horsefacts <109845214+horsefacts@users.noreply.github.com> Date: Fri, 26 Jan 2024 17:12:36 -0700 Subject: [PATCH] fix: window conditional bug (#128) * fix: window conditional * fix: check for window in domain defaults * chore: bump version --- packages/auth-kit/CHANGELOG.md | 6 ++++++ packages/auth-kit/package.json | 2 +- .../src/components/AuthKitProvider/AuthKitProvider.tsx | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/auth-kit/CHANGELOG.md b/packages/auth-kit/CHANGELOG.md index 7b7a0a7..999c0bc 100644 --- a/packages/auth-kit/CHANGELOG.md +++ b/packages/auth-kit/CHANGELOG.md @@ -1,5 +1,11 @@ # @farcaster/auth-kit +## 0.1.3 + +### Patch Changes + +- 2c76849: fix: check for window in domain defaults + ## 0.1.2 ### Patch Changes diff --git a/packages/auth-kit/package.json b/packages/auth-kit/package.json index 3eafe8d..500e429 100644 --- a/packages/auth-kit/package.json +++ b/packages/auth-kit/package.json @@ -1,6 +1,6 @@ { "name": "@farcaster/auth-kit", - "version": "0.1.2", + "version": "0.1.3", "type": "module", "main": "./dist/auth-kit.js", "types": "./dist/auth-kit.d.ts", diff --git a/packages/auth-kit/src/components/AuthKitProvider/AuthKitProvider.tsx b/packages/auth-kit/src/components/AuthKitProvider/AuthKitProvider.tsx index 1ed4589..e6d89b1 100644 --- a/packages/auth-kit/src/components/AuthKitProvider/AuthKitProvider.tsx +++ b/packages/auth-kit/src/components/AuthKitProvider/AuthKitProvider.tsx @@ -35,7 +35,7 @@ export interface AuthKitContextValues { onSignOut: () => void; } -const domainDefaults = window.location ? { +const domainDefaults = window?.location ? { domain: window.location.host, siweUri: window.location.href } : {};