Skip to content

Commit

Permalink
♻️ refactor: Remove useless polyfill.
Browse files Browse the repository at this point in the history
Not necessary since bundler outputs it if necessary.
  • Loading branch information
make-github-pseudonymous-again committed Mar 17, 2021
1 parent b577cc8 commit 892830e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/extendError.js
Expand Up @@ -21,12 +21,7 @@ export default function extendError(parent, name) {
},
});

if (Object.setPrototypeOf) {
Object.setPrototypeOf(CustomError, Error);
} else {
// eslint-disable-next-line no-proto
CustomError.__proto__ = Error;
}
Object.setPrototypeOf(CustomError, Error);

return CustomError;
}

0 comments on commit 892830e

Please sign in to comment.