From 202425aba1b48ee73cb48873011aeaf6780e349f Mon Sep 17 00:00:00 2001 From: acode-x Date: Thu, 27 Oct 2022 15:15:22 +0530 Subject: [PATCH] Use ES5 style function syntax Issues: https://github.com/protobufjs/protobuf.js/issues/1829 --- src/util/minimal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/minimal.js b/src/util/minimal.js index 35008ecc4..62d683326 100644 --- a/src/util/minimal.js +++ b/src/util/minimal.js @@ -288,7 +288,7 @@ function newError(name) { configurable: true, }, name: { - get() { return name; }, + get: function get() { return name; }, set: undefined, enumerable: false, // configurable: false would accurately preserve the behavior of @@ -298,7 +298,7 @@ function newError(name) { configurable: true, }, toString: { - value() { return this.name + ": " + this.message; }, + value: function value() { return this.name + ": " + this.message; }, writable: true, enumerable: false, configurable: true,