Skip to content

Commit

Permalink
Use location href
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Sep 28, 2023
1 parent 747c059 commit 96900cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ <h1>{{appTitle}}</h1>
}

document.addEventListener('click', function (event) {
event.preventDefault();
if (event.target.tagName == 'A' && event.target.href) {
window.history.pushState({}, '', window.location.toString());
window.location.replace(event.target.href);
event.preventDefault();
window.location.href = event.target.href;
}
});
</script>
Expand Down

0 comments on commit 96900cf

Please sign in to comment.