@vertexvis/stream-api 0.23.2-canary.0 → 0.23.2-testing.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1268,13 +1268,30 @@ function newError(name) {
1268
1268
  merge(this, properties);
1269
1269
  }
1270
1270
 
1271
- (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
1272
-
1273
- Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });
1274
-
1275
- CustomError.prototype.toString = function toString() {
1276
- return this.name + ": " + this.message;
1277
- };
1271
+ CustomError.prototype = Object.create(Error.prototype, {
1272
+ constructor: {
1273
+ value: CustomError,
1274
+ writable: true,
1275
+ enumerable: false,
1276
+ configurable: true,
1277
+ },
1278
+ name: {
1279
+ get: function get() { return name; },
1280
+ set: undefined,
1281
+ enumerable: false,
1282
+ // configurable: false would accurately preserve the behavior of
1283
+ // the original, but I'm guessing that was not intentional.
1284
+ // For an actual error subclass, this property would
1285
+ // be configurable.
1286
+ configurable: true,
1287
+ },
1288
+ toString: {
1289
+ value: function value() { return this.name + ": " + this.message; },
1290
+ writable: true,
1291
+ enumerable: false,
1292
+ configurable: true,
1293
+ },
1294
+ });
1278
1295
 
1279
1296
  return CustomError;
1280
1297
  }