page-transition 0.1.0-beta.10 → 0.1.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,6 @@ export function useHandleLinkClick({ container, handleLinkClick, currentPathname
42
42
  state.current = 'navigating';
43
43
  router.push(currentPathname.current);
44
44
  }
45
- state.current = 'navigating';
46
45
  container.current?.classList.remove('exit');
47
46
  container.current?.classList.add('enter');
48
47
  state.current = 'entering';
@@ -31,7 +31,6 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
31
31
  reverse,
32
32
  delay
33
33
  });
34
- state.current = 'navigating';
35
34
  container.current?.classList.remove('exit');
36
35
  container.current?.classList.add('enter');
37
36
  state.current = 'entering';
@@ -56,7 +55,7 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
56
55
  resolveFn.current = resolve;
57
56
  resolveUseFn.current = reject;
58
57
  new Promise((resolveNavigating) => {
59
- if (state.current === "navigating") {
58
+ if (state.current === "navigating" || state.current === "entering") {
60
59
  if (currentPathname.current !== window.location.pathname) {
61
60
  if (checkTransitionFinish(transitionEndData.current, () => {
62
61
  resolveFn.current?.();
@@ -78,9 +77,6 @@ export function usePopState({ container, currentPathname, transitionEndData, tra
78
77
  }
79
78
  }).then(() => {
80
79
  if (currentPathname.current === window.location.pathname) {
81
- if (checkTransitionFinish(transitionEndData.current, afterExitFn.current)) {
82
- return;
83
- }
84
80
  transitionEnd({
85
81
  transitionEndObj: afterExit,
86
82
  transitionEndHandler,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "page-transition",
3
- "version": "0.1.0-beta.10",
3
+ "version": "0.1.0-beta.12",
4
4
  "description": "A page transition library for the Next.js App Router.",
5
5
  "license": "MIT",
6
6
  "files": [