Skip to content

Commit

Permalink
Tweaking url parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyd450 committed Jul 19, 2024
1 parent 15d55a7 commit 084bb5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/utils/validateUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const isValidUrl = (url: string): boolean => {
try {
const parsedUrl = new URL(url);
// check for presence of a dot
return parsedUrl.hostname.includes(".");
return parsedUrl.hostname
} catch (error) {
return false;
}
Expand Down

0 comments on commit 084bb5c

Please sign in to comment.