Unleash / unleash-proxy-client-js

A browser client that can be used together with the unleash-proxy.
Apache License 2.0
45 stars 46 forks source link

Can't find variable: DOMException (React Native) #221

Closed ibrahimchraibi closed 1 month ago

ibrahimchraibi commented 1 month ago

Describe the bug

Hello :)

We are currently using @unleash/proxy-client-react & unleash-proxy-client in our React Native project, according to the documentation React Native platform should be supported, but this exception started popping due to this line:

https://github.com/Unleash/unleash-proxy-client-js/blob/d13ad709213cad7bedd92c8a4c1bc9ee09d4a5c7/src/index.ts#L508

Which makes sense since DOMException is browser specific.

Are we missing something? Wouldn't be enough to check for the exception name?

Thank you very much for your answer and for the solid work on this awesome project!

Steps to reproduce the bug

No response

Expected behavior

No response

Logs, error output, etc.

ReferenceError <unknown>(unleash-proxy-client/build/main)
Level: Error
Can't find variable: DOMException

Screenshots

No response

Additional context

No response

Unleash version

No response

Subscription type

Open source

Hosting type

Self-hosted

SDK information (language and version)

@unleash/proxy-client-react (React Native)

kwasniew commented 1 month ago

Hi @ibrahimchraibi ! Thanks for the report. We fixed this issue here: https://github.com/Unleash/unleash-proxy-client-js/pull/222 Next week we'll release a new version and bump up React SDK

thomasheartman commented 1 month ago

Hey, @ibrahimchraibi! We've released updated versions of both the JS SDK (v3.5.2) and the React SDK (4.3.1) now. If you're still seeing issues after that, let us know ☺️

ibrahimchraibi commented 1 month ago

Thanks a lot for the quick fix! :)