Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/vuejs/core
/ hasInjectionContext
Function
hasInjectionContext
packages/runtime-core/src/apiInject.ts:92–94 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
90
* user. One example is `useRoute()` in `vue-router`.
91
*/
92
export
function
hasInjectionContext(): boolean {
93
return
!!(getCurrentInstance() || currentApp)
94
}
Callers
2
apiInject.spec.ts
File · 0.85
setup
Function · 0.85
Calls
1
getCurrentInstance
Function · 0.90
Tested by
1
setup
Function · 0.68