Skip to content

Commit bbba42f

Browse files
anonrigruyadorno
authored andcommitted
url: remove unnecessary object call to kFormat
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>
1 parent 1812a89 commit bbba42f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/internal/url.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -748,13 +748,13 @@ class URL {
748748
toString() {
749749
if (!isURLThis(this))
750750
throw new ERR_INVALID_THIS('URL');
751-
return this[kFormat]({});
751+
return this[kFormat]();
752752
}
753753

754754
get href() {
755755
if (!isURLThis(this))
756756
throw new ERR_INVALID_THIS('URL');
757-
return this[kFormat]({});
757+
return this[kFormat]();
758758
}
759759

760760
set href(input) {
@@ -1011,7 +1011,7 @@ class URL {
10111011
toJSON() {
10121012
if (!isURLThis(this))
10131013
throw new ERR_INVALID_THIS('URL');
1014-
return this[kFormat]({});
1014+
return this[kFormat]();
10151015
}
10161016

10171017
static createObjectURL(obj) {

0 commit comments

Comments
 (0)