Skip to content

Commit

Permalink
fix: missed one (#5573)
Browse files Browse the repository at this point in the history
  • Loading branch information
erights authored Jun 10, 2022
1 parent 93f0a77 commit 24506ab
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/agoric-cli/test/test-main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* global globalThis */
import '@endo/init/pre.js';
import 'esm';
// Not yet '@endo/init/debug.js' because esm needs moderate override taming
import '@endo/init';
import '@endo/init/debug.js';
import test from 'ava';
import fs from 'fs';
import anylogger from 'anylogger';
Expand Down
50 changes: 50 additions & 0 deletions patches/@confio+ics23++protobufjs+6.11.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
diff --git a/node_modules/@confio/ics23/node_modules/protobufjs/src/util/minimal.js b/node_modules/@confio/ics23/node_modules/protobufjs/src/util/minimal.js
index 3c406de..083f71c 100644
--- a/node_modules/@confio/ics23/node_modules/protobufjs/src/util/minimal.js
+++ b/node_modules/@confio/ics23/node_modules/protobufjs/src/util/minimal.js
@@ -280,13 +280,38 @@ function newError(name) {
merge(this, properties);
}

- (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
-
- Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });
-
- CustomError.prototype.toString = function toString() {
- return this.name + ": " + this.message;
- };
+ CustomError.prototype = Object.create(Error.prototype, {
+ constructor: {
+ value: CustomError,
+ writable: true,
+ // enumerable: true would accurately preserve the behavior of the
+ // original assignment, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would not
+ // be enumerable.
+ enumerable: false,
+ configurable: true,
+ },
+ name: {
+ get() { return name; },
+ set: undefined,
+ enumerable: false,
+ // configurable: false would accurately preserve the behavior of
+ // the original, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would
+ // be configurable.
+ configurable: true,
+ },
+ toString: {
+ value() { return this.name + ": " + this.message; },
+ writable: true,
+ // enumerable: true would accurately preserve the behavior of the
+ // original assignment, but I'm guessing that was not intentional.
+ // For an actual error subclass, this property would not
+ // be enumerable.
+ enumerable: false,
+ configurable: true,
+ },
+ });

return CustomError;
}

0 comments on commit 24506ab

Please sign in to comment.