UNPKG

385 BJavaScriptView Raw
1'use strict';
2var defineBuiltIn = require('../internals/define-built-in');
3var errorToString = require('../internals/error-to-string');
4
5var ErrorPrototype = Error.prototype;
6
7// `Error.prototype.toString` method fix
8// https://tc39.es/ecma262/#sec-error.prototype.tostring
9if (ErrorPrototype.toString !== errorToString) {
10 defineBuiltIn(ErrorPrototype, 'toString', errorToString);
11}