From 64e8936ad9f73c68b3fa1e57857dd38323b5a745 Mon Sep 17 00:00:00 2001 From: Arun <91404478+acode-x@users.noreply.github.com> Date: Fri, 3 Feb 2023 02:24:44 +0530 Subject: [PATCH] fix: use ES5 style function syntax (#1830) 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,