From afe05d719b4ecd51fde4b1cb0d91d6c84abc01b7 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 19 Oct 2022 18:08:09 +0000 Subject: [PATCH] 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 Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts index f8606fd42e..7886104eef 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/main-erm.ts @@ -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(); -- 2.39.5