File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -92,16 +92,20 @@ export class StreamClient {
9292 readonly config ?: string | StreamClientOptions ,
9393 ) {
9494 this . token = JWTServerToken ( this . secret ) ;
95- this . video = new StreamVideoClient ( this ) ;
96- this . chat = new StreamChatClient ( this ) ;
9795
9896 if ( typeof config === 'string' ) {
9997 this . options . basePath = config ;
10098 this . options . timeout = StreamClient . DEFAULT_TIMEOUT ;
10199 } else {
100+ if ( config ) {
101+ this . options = config ;
102+ }
102103 this . options . timeout = config ?. timeout ?? StreamClient . DEFAULT_TIMEOUT ;
103104 }
104105
106+ this . video = new StreamVideoClient ( this ) ;
107+ this . chat = new StreamChatClient ( this ) ;
108+
105109 const chatConfiguration = this . getConfiguration ( ) ;
106110 /** @ts -expect-error */
107111 this . usersApi = new UsersApi ( chatConfiguration ) ;
You can’t perform that action at this time.
0 commit comments