Skip to content

Commit

Permalink
removed the 'continue'
Browse files Browse the repository at this point in the history
  • Loading branch information
uksarkar committed Feb 21, 2023
1 parent 1869d54 commit 21fc562
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/lib/isMailtoURI.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,8 @@ function parseMailtoQueryString(queryString) {
for (const q of queryParams) {
const [key, value] = q.split('=');

if (!key) {
// eslint-disable-next-line no-continue
continue;
}

// checked for invalid and duplicated query params
if (!allowedParams.has(key)) {
if (key && !allowedParams.has(key)) {
isParseFailed = true;
break;
}
Expand All @@ -31,7 +26,9 @@ function parseMailtoQueryString(queryString) {
query[key] = value;
}

allowedParams.delete(key);
if (key) {
allowedParams.delete(key);
}
}

return isParseFailed ? false : query;
Expand Down

0 comments on commit 21fc562

Please sign in to comment.