-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Description
Describe the bug
In Vue v3.6.0-alpha.1
, getCurrentInstance()
returns null
in Vapor components will cause these two functions to fail to run because they cannot pass the environment check

Reproduction
https://stackblitz.com/edit/vitejs-vite-m1bs1kix?file=src%2FApp.vue
System Info
System:
OS: Windows 11 10.0.22631
CPU: (16) x64 AMD Ryzen 7 8845HS w/ Radeon 780M Graphics
Memory: 12.32 GB / 31.31 GB
Binaries:
Node: 22.15.1 - D:\Program Files\nodejs\node.EXE
npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD
pnpm: 10.12.2 - D:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (127.0.2651.98)
Internet Explorer: 11.0.22621.3527
npmPackages:
@vueuse/core: ^13.4.0 => 13.4.0
vue: v3.6.0-alpha.1 => 3.6.0-alpha.1
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
OrbisK