Skip to content

Commit baf12ae

Browse files
committed
ref: Remove Object.assign method usage
1 parent b6c0500 commit baf12ae

File tree

4 files changed

+4
-44
lines changed

4 files changed

+4
-44
lines changed

packages/browser/test/integration/polyfills/assign.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

packages/browser/test/integration/run.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function build() {
7575
"polyfills/fetch.js",
7676
"polyfills/raf.js",
7777
"polyfills/events.js",
78-
"polyfills/assign.js",
7978
]);
8079

8180
writeFile(

packages/core/src/dsn.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,22 @@ export class Dsn implements DsnComponents {
5656
/** Parses a string into this Dsn. */
5757
private _fromString(str: string): void {
5858
const match = DSN_REGEX.exec(str);
59+
5960
if (!match) {
6061
throw new SentryError(ERROR_MESSAGE);
6162
}
6263

6364
const [protocol, user, pass = '', host, port = '', lastPath] = match.slice(1);
6465
let path = '';
6566
let projectId = lastPath;
67+
6668
const split = projectId.split('/');
6769
if (split.length > 1) {
6870
path = split.slice(0, -1).join('/');
6971
projectId = split.pop() as string;
7072
}
71-
Object.assign(this, { host, pass, path, projectId, port, protocol, user });
73+
74+
this._fromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, user });
7275
}
7376

7477
/** Maps Dsn components into this instance. */

packages/hub/src/scope.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ export class Scope implements ScopeInterface {
224224
*/
225225
public static clone(scope?: Scope): Scope {
226226
const newScope = new Scope();
227-
Object.assign(newScope, scope, {
228-
_scopeListeners: [],
229-
});
230227
if (scope) {
231228
newScope._breadcrumbs = [...scope._breadcrumbs];
232229
newScope._tags = { ...scope._tags };

0 commit comments

Comments
 (0)