Skip to content

Commit

Permalink
test: remove nextTick from scrollBehavior Promise
Browse files Browse the repository at this point in the history
  • Loading branch information
rylanharper committed Nov 25, 2024
1 parent dbcd64a commit 32dc505
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/router.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ export default <RouterConfig>{

return new Promise((resolve) => {
nuxtApp.hooks.hookOnce('page:finish', () => {
nextTick(() => {
requestAnimationFrame(() => {
resolve(calculatePosition(to, savedPosition, 'instant'));
});
requestAnimationFrame(() => {
resolve(calculatePosition(to, savedPosition, 'instant'));
});
});
});
Expand Down

0 comments on commit 32dc505

Please sign in to comment.