Skip to content

Commit 51b79ff

Browse files
authored
fix: handle issue with process and DOM conflict (#1331)
1 parent c6a5ab2 commit 51b79ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,11 @@ export class StreamChat<StreamChatGenerics extends ExtendableGenerics = DefaultG
324324

325325
this.setBaseURL(this.options.baseURL || 'https://chat.stream-io-api.com');
326326

327-
if (typeof process !== 'undefined' && process.env.STREAM_LOCAL_TEST_RUN) {
327+
if (typeof process !== 'undefined' && 'env' in process && process.env.STREAM_LOCAL_TEST_RUN) {
328328
this.setBaseURL('http://localhost:3030');
329329
}
330330

331-
if (typeof process !== 'undefined' && process.env.STREAM_LOCAL_TEST_HOST) {
331+
if (typeof process !== 'undefined' && 'env' in process && process.env.STREAM_LOCAL_TEST_HOST) {
332332
this.setBaseURL('http://' + process.env.STREAM_LOCAL_TEST_HOST);
333333
}
334334

0 commit comments

Comments
 (0)