Skip to content

fix(devtools-kit): remove special handling for Router object#1092

Merged
webfansplz merged 1 commit intovuejs:mainfrom
skirtles-code:router-as-object
Apr 26, 2026
Merged

fix(devtools-kit): remove special handling for Router object#1092
webfansplz merged 1 commit intovuejs:mainfrom
skirtles-code:router-as-object

Conversation

@skirtles-code
Copy link
Copy Markdown
Contributor

There's currently some special handling for rendering a Vue Router instance. However...

  1. The check for val.constructor.name === 'VueRouter' is for the Vue 2 router, so it doesn't do anything with Vue 3. The code involving getRouterDetails doesn't actually run.
  2. The other relevant code path in replacer.ts returns '[object Router]', which isn't very helpful (see Before screenshot below).

I had originally intended to fix that second code path to call getRouterDetails, which did work, but it then occurred to me that none of this is really necessary. Maybe at some point in the past there were issues displaying the router instance, but just treating it like any other object works fine now.

Before:

image

After:

image

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 25, 2026

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit 5e1cb75
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/69ed058fc4da6f0009f810f2

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 25, 2026

Open in StackBlitz

@vue/devtools-applet

npm i https://pkg.pr.new/@vue/devtools-applet@1092

@vue/devtools-core

npm i https://pkg.pr.new/@vue/devtools-core@1092

@vue/devtools

npm i https://pkg.pr.new/@vue/devtools@1092

@vue/devtools-api

npm i https://pkg.pr.new/@vue/devtools-api@1092

@vue/devtools-kit

npm i https://pkg.pr.new/@vue/devtools-kit@1092

@vue/devtools-electron

npm i https://pkg.pr.new/@vue/devtools-electron@1092

@vue/devtools-shared

npm i https://pkg.pr.new/@vue/devtools-shared@1092

@vue/devtools-ui

npm i https://pkg.pr.new/@vue/devtools-ui@1092

vite-plugin-vue-devtools

npm i https://pkg.pr.new/vite-plugin-vue-devtools@1092

commit: 5e1cb75

@webfansplz webfansplz merged commit c2dde29 into vuejs:main Apr 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants