Skip to content

Commit

Permalink
test: fix test case 070_location
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Jan 13, 2021
1 parent 51d197e commit 9326d5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/tests/070_location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ console.log(location);
try {
location.hostname = "bar";
} catch (error) {
console.log(error);
console.log(error.toString());
}
2 changes: 1 addition & 1 deletion op_crates/web/00_dom_exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
this.#message = String(message);
this.#name = name;
this.#code = nameToCodeMapping[name] ?? 0;
this.stack = new Error().stack.replace(/^Error/, "DOMException");
this.stack = new Error().stack.replace(/^Error/, this.#message ? `DOMException: ${this.#message}` : 'DOMException');
}

get message() {
Expand Down

0 comments on commit 9326d5a

Please sign in to comment.