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 ruyadorno committed Nov 21, 2022
1 parent 1812a89 commit bbba42f
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 bbba42f

Please sign in to comment.