From bbba42fcb2592e6ab45c036578b5b31d6b41fbbe Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 17 Nov 2022 08:56:56 -0500 Subject: [PATCH] url: remove unnecessary object call to kFormat PR-URL: https://github.com/nodejs/node/pull/45492 Reviewed-By: Rich Trott Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell Reviewed-By: Zijian Liu Reviewed-By: Luigi Pinca Reviewed-By: Santiago Gimeno --- lib/internal/url.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index 1f84e05e1d6142..40b25f6890b5db 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -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) { @@ -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) {