Skip to content

Commit f5c2107

Browse files
committed
cleanup
1 parent c3043de commit f5c2107

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

packages/core/src/baseclient.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,21 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
112112
*/
113113
protected constructor(options: O) {
114114
this._options = options;
115+
115116
if (options.dsn) {
116117
this._dsn = makeDsn(options.dsn);
117-
if (this._dsn) {
118-
const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);
119-
this._transport = options.transport({
120-
recordDroppedEvent: this.recordDroppedEvent.bind(this),
121-
...options.transportOptions,
122-
url,
123-
});
124-
}
125118
} else {
126119
__DEBUG_BUILD__ && logger.warn('No DSN provided, client will not do anything.');
127120
}
121+
122+
if (this._dsn) {
123+
const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);
124+
this._transport = options.transport({
125+
recordDroppedEvent: this.recordDroppedEvent.bind(this),
126+
...options.transportOptions,
127+
url,
128+
});
129+
}
128130
}
129131

130132
/**

0 commit comments

Comments
 (0)