This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
fix: Cannot read property 'add' of undefined at onGlobalSetup #488
Labels
bug
Something isn't working
Comments
@JoeyYoung1997 Would you provide a reproduction? 🙏 |
danielroe
added
the
needs-repro
Waiting for code that can reproduce the issue
label
May 24, 2021
— with
Volta.net
I got the same error. Chrome:
Firefox:
|
Same issue here,
While calling
|
Would you provide a reproduction so I can check this out? |
Hi @danielroe, Thank you for your prompt response, following is a reproduction: https://codesandbox.io/s/goofy-night-t2sr6 The error occurs in
|
danielroe
removed
the
needs-repro
Waiting for code that can reproduce the issue
label
May 25, 2021
— with
Volta.net
Calling import { provide, onGlobalSetup, globalPlugin } from '@nuxtjs/composition-api'
const myPlugin: Plugin = function (context, inject) {
globalPlugin(context, inject)
onGlobalSetup(() => {
provide(...)
})
} |
This should be fixed in |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐛 The bug
What isn't working? Describe what the bug is.
I found out after debugger, "const onGlobalSetup =(fn)=> {globalSetup.add(fn);};", in this code, globalSetup has not yet been assigned in the globalPlugin function
code show as below:
export default ({ app, store }, inject) => {
onGlobalSetup(() => {
inject('navigateTo', func)
})
}
The text was updated successfully, but these errors were encountered: