Skip to content

fix(client): ReferenceError: Property 'document' doesn't exist on react native - #1131

Closed
santiagofm wants to merge 1 commit into
DevCycleHQ:mainfrom
santiagofm:patch-2
Closed

fix(client): ReferenceError: Property 'document' doesn't exist on react native#1131
santiagofm wants to merge 1 commit into
DevCycleHQ:mainfrom
santiagofm:patch-2

Conversation

@santiagofm

@santiagofm santiagofm commented Aug 5, 2025

Copy link
Copy Markdown

When using @devcycle/react-client-sdk we keep getting a reference error because the global document object doesn't exist on react-native.

Seems like we are guarding against this when registering the visibility changed handlers, but not when closing the client and unregistering.

@santiagofm
santiagofm requested a review from a team as a code owner August 5, 2025 13:53
@vercel

vercel Bot commented Aug 5, 2025

Copy link
Copy Markdown

@santiagofm is attempting to deploy a commit to the DevCycle Team on Vercel.

A member of the Team first needs to authorize it.

@kaushalkapasi

Copy link
Copy Markdown
Contributor

Hey @santiagofm thanks for opening this PR, I've made an internal PR with the same change so that all the tests can run due to our security requirements. We should have this fix merged & released shortly!

@kaushalkapasi

Copy link
Copy Markdown
Contributor

Hey @santiagofm, we've release this fix as part of React-Native SDK v1.22.1. Thanks for submitting this fix!

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.

2 participants