We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83f52ca commit 4b0ab04Copy full SHA for 4b0ab04
sdks/typescript/packages/sdk/src/db_connection_impl.ts
@@ -202,7 +202,9 @@ export class DbConnectionImpl<
202
}: DbConnectionConfig) {
203
stdbLogger('info', 'Connecting to SpacetimeDB WS...');
204
205
- let url = new URL(uri);
+ // Use .toString() due to some React Native versions have a bug where the `URL` constructor treat
206
+ // tries to call `.endsWith()` on an URI object, therefore causing an error.
207
+ let url = new URL(uri.toString());
208
if (!/^wss?:/.test(uri.protocol)) {
209
url.protocol = url.protocol === 'https:' ? 'wss:' : 'ws:';
210
}
0 commit comments