Skip to content

Commit

Permalink
chore: add additonal const to figure out which part is partial
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Nov 24, 2023
1 parent 7e60eed commit a91d78b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/lib/isMailtoURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export default function isMailtoURI(url, options) {
return false;
}

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

if (!to && !queryString) {
return true;
Expand Down
3 changes: 0 additions & 3 deletions test/validators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14500,9 +14500,6 @@ describe('Validators', () => {
'',
'somthing',
'[email protected]',
'?subject=one',
'?mailto:',
'mailto:?mailto:?subject=one',
'mailto:?subject=okay&subject=444',
'mailto:?subject=something&wrong=888',
'mailto:somename@gmail.com',
Expand Down

0 comments on commit a91d78b

Please sign in to comment.