From 7b07a03d6446b6ceb287b10e23ba657d5979be63 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 28 Jun 2021 17:01:23 +0200 Subject: [PATCH] test(e2e): updates --- e2e/scroll-behavior/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/e2e/scroll-behavior/index.ts b/e2e/scroll-behavior/index.ts index f0255362..21d1d64e 100644 --- a/e2e/scroll-behavior/index.ts +++ b/e2e/scroll-behavior/index.ts @@ -52,7 +52,7 @@ const scrollBehavior: RouterScrollBehavior = async function ( } // check if any matched route config has meta that requires scrolling to top - if (to.matched.some(m => m.meta.scrollToTop)) { + if (to.meta.scrollToTop) { // coords will be used if no selector is provided, // or if the selector didn't match any element. return { left: 0, top: 0, behavior } @@ -73,6 +73,12 @@ const router = createRouter({ ], }) +declare module '../../src' { + export interface RouteMeta { + scrollToTop?: boolean + } +} + scrollWaiter.add() const smoothScroll = ref(false) -- 2.47.3