From 4cd09afe94635e3cb7129cc158d92fad97644af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Tue, 9 Jan 2024 16:26:26 +0100 Subject: [PATCH] pkp/pkp-lib#9587 fix: share one pinia instance across vue instances to avoid disconnecting from store --- js/load.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/load.js b/js/load.js index c325d331412..a91ce652cff 100644 --- a/js/load.js +++ b/js/load.js @@ -200,10 +200,11 @@ VueRegistry.registerComponent('field-pub-id', FieldPubId); // Register ListPanel VueRegistry.registerComponent('PkpListPanel', ListPanel); +const pinia = createPinia(); + function pkpCreateVueApp(createAppArgs) { // Initialize Vue const vueApp = createApp(createAppArgs); - const pinia = createPinia(); vueApp.use(pinia); // https://github.com/vuejs/pinia/discussions/1197