Skip to content

Commit

Permalink
chore(isMailtoURI): remove unnecessary default to (#2341)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
WikiRik committed Mar 5, 2024
1 parent 332b501 commit 4197b86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/isMailtoURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4197b86

Please sign in to comment.