Skip to content

Commit 33ab501

Browse files
committed
only bind client in Hub constructor if client exists
1 parent 4cae56b commit 33ab501

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/hub/src/hub.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export class Hub implements HubInterface {
103103
*/
104104
public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {
105105
this.getStackTop().scope = scope;
106-
this.bindClient(client);
106+
if (client) {
107+
this.bindClient(client);
108+
}
107109
}
108110

109111
/**

0 commit comments

Comments
 (0)