knocklabs / javascript

Official JavaScript packages for interacting with Knock
https://knock.app/
MIT License
10 stars 2 forks source link

fix: check if document is defined before setting up auto socket manager #129

Closed connorlindsey closed 2 months ago

connorlindsey commented 2 months ago

The auto socket manager uses event listeners which causes an error in the React Native SDK if the feature is enabled. This PR updates the setup/teardown code to check if the document is defined beforehand.

linear[bot] commented 2 months ago

KNO-5858 [RN SDK] document doesn't exist error caused by JS SDK

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
javascript-slack-connect-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 4:19pm
javascript-slack-kit-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2024 4:19pm
changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 887ac7fbdaf808c82ee77ac7b206d4ca42a3518f

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

This PR includes changesets to release 7 packages | Name | Type | | ------------------------------- | ----- | | @knocklabs/client | Patch | | client-example | Patch | | @knocklabs/react-core | Patch | | @knocklabs/react-native | Patch | | @knocklabs/react | Patch | | @knocklabs/react-native-example | Patch | | nextjs-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