Skip to content

Commit

Permalink
fix(tracker): remove typescript-only '?' notation because it was not …
Browse files Browse the repository at this point in the history
…being transpiled properly
  • Loading branch information
Maronato committed Oct 12, 2020
1 parent b94fd69 commit 594796f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default function Plausible(
}

// Attach hashchange listener
if (defaults?.hashMode) {
if (defaults && defaults.hashMode) {
addEventListener('hashchange', page);
}

Expand All @@ -214,7 +214,7 @@ export default function Plausible(
history.pushState = originalPushState;
removeEventListener('popstate', page);
}
if (defaults?.hashMode) {
if (defaults && defaults.hashMode) {
removeEventListener('hashchange', page);
}
};
Expand Down

0 comments on commit 594796f

Please sign in to comment.