]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
feat(warn): improve getActivePinia warn
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 28 Oct 2021 09:24:36 +0000 (11:24 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 28 Oct 2021 09:24:36 +0000 (11:24 +0200)
packages/pinia/src/store.ts

index 8003155404f8f87d83f778e0682871184c8ad8d9..bafb95e7feb92df5783a4f00387b63195700d543 100644 (file)
@@ -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.`
       )
     }