]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
fix(devtools): avoid running outside of browsers
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 27 Nov 2024 14:36:48 +0000 (15:36 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 27 Nov 2024 14:36:53 +0000 (15:36 +0100)
Fix #2843

packages/pinia/src/createPinia.ts

index eb7dc72394f020cc118273717ffbd350f9e2ff47..7749247a3dff310be2f8b81c1da4d0defcc546d1 100644 (file)
@@ -57,7 +57,7 @@ export function createPinia(): Pinia {
 
   // pinia devtools rely on dev only features so they cannot be forced unless
   // the dev build of Vue is used. Avoid old browsers like IE11.
-  if (__USE_DEVTOOLS__ && typeof Proxy !== 'undefined') {
+  if (__USE_DEVTOOLS__ && IS_CLIENT && typeof Proxy !== 'undefined') {
     pinia.use(devtoolsPlugin)
   }