Bug 32030: Fix for app undefined error

Solution found at: https://stackoverflow.com/a/65346965/3594153

If we install new version of the packages, we got the following error in
the console:
  Firefox - Uncaught TypeError: app is undefined
  Chrome - Cannot read properties of undefined (reading 'config')

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Pedro Amorim 2022-10-19 18:08:09 +00:00 committed by Tomas Cohen Arazi
parent 19fc1bdef5
commit afe05d719b
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -34,12 +34,14 @@ const languages = { en, "de-DE": de_DE, "es-ES": es_ES, "fr-FR": fr_FR };
const messages = Object.assign(languages);
const i18n = createI18n({ locale: "en", messages });
const app = createApp(App)
.use(createPinia())
const app = createApp(App);
const rootComponent = app.use(createPinia())
.use(router)
.use(i18n)
.component("font-awesome-icon", FontAwesomeIcon)
.component("v-select", vSelect);
app.config.unwrapInjectedRef = true;
app.mount("#erm");
const mainStore = useMainStore();