Skip to content

Conversation

@thomaswhyyou
Copy link
Contributor

@thomaswhyyou thomaswhyyou commented Jan 15, 2026

Description

This PR aims to address the issue raised here, where user is running into type errors in places accessing window properties in a react naive project.

We already check for the presence of the window object in code paths meant for browser environment. However it seems that in React Native environments it's possible for window may be polyfilled and present but its properties are undefined (e.g. window.location). So in this PR we extend some of the if checks to cover the window properties we are accessing, in addition to the presence of window itself.

@linear
Copy link

linear bot commented Jan 15, 2026

@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
javascript-ms-teams-connect-example Ready Ready Preview, Comment Jan 15, 2026 8:24pm
javascript-nextjs-example Ready Ready Preview, Comment Jan 15, 2026 8:24pm
javascript-slack-connect-example Ready Ready Preview, Comment Jan 15, 2026 8:24pm
javascript-slack-kit-example Ready Ready Preview, Comment Jan 15, 2026 8:24pm

Review with Vercel Agent

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2026

🦋 Changeset detected

Latest commit: bb918d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@knocklabs/client Patch
client-example Patch
guide-example Patch
@knocklabs/expo Patch
@knocklabs/react-core Patch
@knocklabs/react-native Patch
@knocklabs/react Patch
@knocklabs/expo-example Patch
ms-teams-connect-example Patch
nextjs-app-dir-example Patch
nextjs-example Patch
slack-connect-example Patch
slack-kit-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@thomaswhyyou thomaswhyyou merged commit cf04e5f into main Jan 15, 2026
13 checks passed
@thomaswhyyou thomaswhyyou deleted the thomas-kno-11231-sdk-user-issues-with-type-errors-from-accessing-location branch January 15, 2026 20:56
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 67.84%. Comparing base (e594608) to head (bb918d6).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/client/src/clients/guide/client.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #825   +/-   ##
=======================================
  Coverage   67.84%   67.84%           
=======================================
  Files         190      190           
  Lines        7934     7934           
  Branches     1041     1041           
=======================================
  Hits         5383     5383           
  Misses       2526     2526           
  Partials       25       25           
Files with missing lines Coverage Δ
packages/client/src/clients/guide/client.ts 88.73% <80.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants