Skip to content

fix: check for __VUE_INSPECTOR__ before calling openInEditor#1098

Open
Akur1a wants to merge 1 commit into
vuejs:mainfrom
Akur1a:fix/open-in-editor-options-api
Open

fix: check for __VUE_INSPECTOR__ before calling openInEditor#1098
Akur1a wants to merge 1 commit into
vuejs:mainfrom
Akur1a:fix/open-in-editor-options-api

Conversation

@Akur1a
Copy link
Copy Markdown

@Akur1a Akur1a commented May 12, 2026

Description

When Options API is disabled, the component inspector may not be initialized. This guards the open-in-editor call so the devtools do not throw when __VUE_INSPECTOR__ is unavailable.

Fixes #824

@netlify
Copy link
Copy Markdown

netlify Bot commented May 12, 2026

Deploy Preview for vue-devtools-docs canceled.

Name Link
🔨 Latest commit 111f768
🔍 Latest deploy log https://app.netlify.com/projects/vue-devtools-docs/deploys/6a027db75065370008064589

When Options API is disabled via @vitejs/plugin-vue features config,
the Vue compiler does not initialize __VUE_INSPECTOR__, causing a
TypeError when trying to open a component in the editor.

Add a null check for target.__VUE_INSPECTOR__ before calling
openInEditor, and log a helpful warning when the inspector is not
available.

Fixes vuejs#824
@Akur1a Akur1a force-pushed the fix/open-in-editor-options-api branch from 6af80b4 to 111f768 Compare May 12, 2026 01:09
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.

Open in Editor dosent work when Options API disabled

1 participant