Skip to content

Commit 89f4ecb

Browse files
lobsterkatieAbhiPrasad
authored andcommitted
ref(utils): Remove Object.setPrototypeOf polyfill (#5087)
Now that we're ES6-only, we no longer need to polyfill `Object.setPrototypeOf`. (The last browser to gain support for it did so in September of 2015[1].) [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf#browser_compatibility
1 parent 2217bcc commit 89f4ecb

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

packages/utils/src/error.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { setPrototypeOf } from './polyfill';
2-
31
/** An error emitted by Sentry SDKs and related utilities. */
42
export class SentryError extends Error {
53
/** Display name of this error instance. */
@@ -9,6 +7,6 @@ export class SentryError extends Error {
97
super(message);
108

119
this.name = new.target.prototype.constructor.name;
12-
setPrototypeOf(this, new.target.prototype);
10+
Object.setPrototypeOf(this, new.target.prototype);
1311
}
1412
}

packages/utils/src/polyfill.ts

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

0 commit comments

Comments
 (0)