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 c6a5ab2 commit 51b79ffCopy full SHA for 51b79ff
src/client.ts
@@ -324,11 +324,11 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
324
325
this.setBaseURL(this.options.baseURL || 'https://chat.stream-io-api.com');
326
327
- if (typeof process !== 'undefined' && process.env.STREAM_LOCAL_TEST_RUN) {
+ if (typeof process !== 'undefined' && 'env' in process && process.env.STREAM_LOCAL_TEST_RUN) {
328
this.setBaseURL('http://localhost:3030');
329
}
330
331
- if (typeof process !== 'undefined' && process.env.STREAM_LOCAL_TEST_HOST) {
+ if (typeof process !== 'undefined' && 'env' in process && process.env.STREAM_LOCAL_TEST_HOST) {
332
this.setBaseURL('http://' + process.env.STREAM_LOCAL_TEST_HOST);
333
334
0 commit comments