realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.81k stars 577 forks source link

Throwing `RealmInExpoGoError` only when native module fails to load #6868

Closed kraenhansen closed 3 months ago

kraenhansen commented 3 months ago

What, How & Why?

Debugging an app I found that it seems Expo / Metro is running the code in conditions that trigger the RealmInExpoGoError exception. I suggest moving the ExpoGo check from a top-level into the catch block when loading the native module actually fails.