From 4197b8632522818164cc05d8d6cb44c98eb3decd Mon Sep 17 00:00:00 2001 From: Rik Smale <13023439+WikiRik@users.noreply.github.com> Date: Tue, 5 Mar 2024 15:01:57 +0100 Subject: [PATCH] chore(isMailtoURI): remove unnecessary default to (#2341) * chore: add additional testcases to isMailtoURI Line 44 is only partially covered before this change * chore: add additonal const to figure out which part is partial * chore: add testcase for single ? * chore: add another line to find partial coverage * chore: remove default to * chore: combine consts again --- src/lib/isMailtoURI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/isMailtoURI.js b/src/lib/isMailtoURI.js index 0dd95b6a9..67748a553 100644 --- a/src/lib/isMailtoURI.js +++ b/src/lib/isMailtoURI.js @@ -41,7 +41,7 @@ export default function isMailtoURI(url, options) { return false; } - const [to = '', queryString = ''] = url.replace('mailto:', '').split('?'); + const [to, queryString = ''] = url.replace('mailto:', '').split('?'); if (!to && !queryString) { return true;