Skip to content

Commit

Permalink
remove own AggregateError#toString
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 11, 2019
1 parent e116d0e commit 045bc70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
## Changelog
##### Unreleased
- Throw when `(Async)Iterator#flatMap` mapper returns a non-iterable, per [tc39/proposal-iterator-helpers/55](https://github.com/tc39/proposal-iterator-helpers/issues/55) and [tc39/proposal-iterator-helpers/59](https://github.com/tc39/proposal-iterator-helpers/pull/59)
- Removed own `AggregateError#toString`, per [tc39/proposal-promise-any/49](https://github.com/tc39/proposal-promise-any/pull/49)
- Global `core-js` `Promise` polyfill passes feature detection in the pure versions
- Fixed indexes in `String#replaceAll` callbacks
- `String#replaceAll` marked as supported by FF72
Expand Down
10 changes: 1 addition & 9 deletions packages/core-js/modules/esnext.aggregate-error.js
Expand Up @@ -8,7 +8,6 @@ var defineProperty = require('../internals/object-define-property');
var createPropertyDescriptor = require('../internals/create-property-descriptor');
var iterate = require('../internals/iterate');
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
var anObject = require('../internals/an-object');
var InternalStateModule = require('../internals/internal-state');

var setInternalState = InternalStateModule.set;
Expand All @@ -31,14 +30,7 @@ var $AggregateError = function AggregateError(errors, message) {
$AggregateError.prototype = create(Error.prototype, {
constructor: createPropertyDescriptor(5, $AggregateError),
message: createPropertyDescriptor(5, ''),
name: createPropertyDescriptor(5, 'AggregateError'),
toString: createPropertyDescriptor(5, function toString() {
var name = anObject(this).name;
name = name === undefined ? 'AggregateError' : String(name);
var message = this.message;
message = message === undefined ? '' : String(message);
return name + ': ' + message;
})
name: createPropertyDescriptor(5, 'AggregateError')
});

if (DESCRIPTORS) defineProperty.f($AggregateError.prototype, 'errors', {
Expand Down

0 comments on commit 045bc70

Please sign in to comment.