From 6a0a209faf42b149bcda1dd373e0b1e5bf426ce4 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 28 Oct 2021 11:24:36 +0200 Subject: [PATCH] feat(warn): improve getActivePinia warn --- packages/pinia/src/store.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pinia/src/store.ts b/packages/pinia/src/store.ts index 80031554..bafb95e7 100644 --- a/packages/pinia/src/store.ts +++ b/packages/pinia/src/store.ts @@ -844,9 +844,9 @@ export function defineStore( if (__DEV__ && !activePinia) { throw new Error( - `[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?\n\n` + - `const pinia = createPinia()\n` + - `app.use(pinia)\n\n` + + `[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?\n` + + `\tconst pinia = createPinia()\n` + + `\tapp.use(pinia)\n` + `This will fail in production.` ) } -- 2.47.3