Skip to content

Commit 0069353

Browse files
authored
fix(next): wrong using next history.length (#73)
* fix * changeset
1 parent 4f41aa3 commit 0069353

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/pretty-mice-look.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@use-funnel/next': patch
3+
---
4+
5+
fix(next): wrong using next history.length

packages/next/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const useFunnel = createUseFunnel<NextPageRouteOption>(({ id, initialStat
4343
}
4444
}, [_beforeHistories]);
4545

46-
const currentIndex = history.length;
46+
const currentIndex = beforeHistories.length;
4747

4848
return useMemo(
4949
() => ({

0 commit comments

Comments
 (0)