Skip to content

Commit

Permalink
Add guard around location redirect.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Oct 24, 2022
1 parent 4bad94f commit 99c8752
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "umami",
"version": "1.39.0-beta.1",
"version": "1.39.0-beta.2",
"description": "A simple, fast, privacy-focused alternative to Google Analytics.",
"author": "Mike Cao <[email protected]>",
"license": "MIT",
Expand Down
5 changes: 4 additions & 1 deletion tracker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@
) {
e.preventDefault();
trackEvent(name).then(() => {
location.href = get('href');
const href = get('href');
if (href) {
location.href = href;
}
});
} else {
trackEvent(name);
Expand Down

0 comments on commit 99c8752

Please sign in to comment.