Skip to content

Commit

Permalink
url: remove unnecessary object call to kFormat
Browse files Browse the repository at this point in the history
PR-URL: #45492
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
  • Loading branch information
anonrig authored and danielleadams committed Dec 30, 2022
1 parent 1e0e71a commit d3842bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,13 @@ class URL {
toString() {
if (!isURLThis(this))
throw new ERR_INVALID_THIS('URL');
return this[kFormat]({});
return this[kFormat]();
}

get href() {
if (!isURLThis(this))
throw new ERR_INVALID_THIS('URL');
return this[kFormat]({});
return this[kFormat]();
}

set href(input) {
Expand Down Expand Up @@ -1011,7 +1011,7 @@ class URL {
toJSON() {
if (!isURLThis(this))
throw new ERR_INVALID_THIS('URL');
return this[kFormat]({});
return this[kFormat]();
}

static createObjectURL(obj) {
Expand Down

0 comments on commit d3842bb

Please sign in to comment.