diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2021-10-09 00:01:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-08 17:01:02 +0200 |
commit | 5f405bf1143e5e32ba69f12d6ad10374631ba64b (patch) | |
tree | f5fa744c317993e4d8f87c78328dfbf7fb9276d7 /ext/web/01_dom_exception.js | |
parent | 2155e7545ff0149414f01c9079f99349d96e9f6b (diff) |
fix(ext/web): Format DOMException stack property (#12333)
Diffstat (limited to 'ext/web/01_dom_exception.js')
-rw-r--r-- | ext/web/01_dom_exception.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/web/01_dom_exception.js b/ext/web/01_dom_exception.js index 25eb85fc2..d08a208db 100644 --- a/ext/web/01_dom_exception.js +++ b/ext/web/01_dom_exception.js @@ -96,7 +96,8 @@ }); this.#code = nameToCodeMapping[this.#name] ?? 0; - const error = new Error(`DOMException: ${this.#message}`); + const error = new Error(this.#message); + error.name = "DOMException"; ObjectDefineProperty(this, "stack", { value: error.stack, writable: true, |