Skip to content

Commit

Permalink
fix bfcache problem
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Sep 25, 2024
1 parent 0f966ea commit 214b570
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-dancers-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vtbag/turn-signal': patch
---

Fixes an issue where the scripts where not reexecuted when fetched from the bfcache.
2 changes: 1 addition & 1 deletion src/forced-traversal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ function navigate(e: NavigateEvent) {
}
}
}
navigation?.addEventListener('navigate', navigate, { once: true });
navigation?.addEventListener('navigate', navigate);
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ function allPages() {
: [];
}

'onpagereveal' in window && addEventListener('pagereveal', pageReveal, { once: true });
'onpagereveal' in window && addEventListener('pagereveal', pageReveal);

0 comments on commit 214b570

Please sign in to comment.