Skip to content

Commit

Permalink
chore: combine consts again
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Nov 24, 2023
1 parent a971b48 commit 15f83b0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/isMailtoURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export default function isMailtoURI(url, options) {
return false;
}

const replacedUrl = url.replace('mailto:', '');
const splitUrl = replacedUrl.split('?');
const [to, queryString = ''] = splitUrl;
const [to, queryString = ''] = url.replace('mailto:', '').split('?');

if (!to && !queryString) {
return true;
Expand Down

0 comments on commit 15f83b0

Please sign in to comment.