From: Eduardo San Martin Morote Date: Thu, 28 Oct 2021 09:24:36 +0000 (+0200) Subject: feat(warn): improve getActivePinia warn X-Git-Tag: pinia@2.0.1~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a0a209faf42b149bcda1dd373e0b1e5bf426ce4;p=thirdparty%2Fvuejs%2Fpinia.git feat(warn): improve getActivePinia warn --- 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.` ) }