Skip to content

Commit

Permalink
Remove invalid event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Nov 18, 2021
1 parent e6a021e commit 250af7d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,10 @@ export const Router: Component<RouterProps> = (props) => {
};

addEventListener('popstate', handleHistoryState);
addEventListener('replacestate', handleHistoryState);
addEventListener('pushstate', handleHistoryState);
addEventListener('click', handleClick);

onCleanup(() => {
removeEventListener('popstate', handleHistoryState);
removeEventListener('replacestate', handleHistoryState);
removeEventListener('pushstate', handleHistoryState);
removeEventListener('click', handleClick);
});

Expand Down

0 comments on commit 250af7d

Please sign in to comment.