Add guard around location redirect.

This commit is contained in:
Mike Cao committed 2022-10-24 15:25:07 -07:00
1 parent 4bad94f436
commit 99c8752aa5
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -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);