]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
feat(devtools): warn against old devtools version
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 10 Jun 2022 09:21:03 +0000 (11:21 +0200)
committerEduardo San Martin Morote <posva@users.noreply.github.com>
Thu, 30 Jun 2022 07:59:00 +0000 (09:59 +0200)
See #1338

packages/router/src/devtools.ts

index a7d4f4e143e2e4b2d1182841bb7d37abb40d2977..ea20cdca2a6b5ea1e0fd19fbfc49de45a4c83366 100644 (file)
@@ -72,6 +72,12 @@ export function addDevtools(app: App, router: Router, matcher: RouterMatcher) {
       app,
     },
     api => {
+      if (typeof api.now !== 'function') {
+        console.warn(
+          '[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.'
+        )
+      }
+
       // display state added by the router
       api.on.inspectComponent((payload, ctx) => {
         if (payload.instanceData) {