Skip to content

Commit

Permalink
fix(core): Toggl URL check
Browse files Browse the repository at this point in the history
Closes #1393
  • Loading branch information
shantanuraj committed May 8, 2019
1 parent c039fff commit f6faa0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/scripts/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,10 @@ export function getUrlParam (location: string, key: string) {
}

export function isTogglURL (url: string) {
return togglUrlRegex.test(new URL(url).hostname);
try {
return togglUrlRegex.test(new URL(url).hostname);
} catch (err) {
bugsnagClient.notify(err);
return false;
}
}

0 comments on commit f6faa0a

Please sign in to comment.