You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came up with a quick patch, though, it is very specific to vue-i18n.
Why this happened
A programmatically opened Modal is hosted on a Vue app different from the main Vue app. This caused a problem that no plugins installed into the main Vue app were available on the Vue app hosting Modal. This problem was fixed by #102 by copying the app context from the main Vue app to the Vue app hosting Modal. However, vue-i18n injects another private field (__VUE_I18N_SYMBOL__) in Vue apps, which is not addressed by #102. useI18nthrows an error if a Vue app does not have the field.
Quick patch
Copy __VUE_I18N_SYMBOL__ from the main Vue app to the Vue app hosting Modal.
kikuomax
added a commit
to kikuomax/buefy
that referenced
this issue
Dec 3, 2023
- Quick fixes the issue that `useI18n` did not work in a setup script
within the context of a programmatically opened `Modal`.
`copyAppContext` helper function also copies the private field
`__VUE_I18N_SYMBOL__` used by `vue-i18n`. However, we will face
similar problems unless we generalize the problem and fix it.
issue ntohq#153
…programmatically opened Modal (#153) (#154)
* fix(lib): useI18n did not work in Modal
- Quick fixes the issue that `useI18n` did not work in a setup script
within the context of a programmatically opened `Modal`.
`copyAppContext` helper function also copies the private field
`__VUE_I18N_SYMBOL__` used by `vue-i18n`. However, we will face
similar problems unless we generalize the problem and fix it.
issue #153
Overview of the problem
Buefy version: [0.1.3-8518d47780e734635d6e6cd8fa2ce32f3685e1d0]
Vuejs version: [3.3.9]
OS/Browser: Safari
Description
useI18n
did not work in a setup script within the context of a programmatically opened Modal. I faced the following error:I found this while investigating this discussion.
Steps to reproduce
Expected behavior
Get no error.
Actual behavior
Got an error.
The text was updated successfully, but these errors were encountered: