From eb5e6fd6073da8e828a9087c876d0e8fde3cdb3d Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 27 Nov 2024 15:36:48 +0100 Subject: [PATCH] fix(devtools): avoid running outside of browsers Fix #2843 --- packages/pinia/src/createPinia.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pinia/src/createPinia.ts b/packages/pinia/src/createPinia.ts index eb7dc72394..7749247a3d 100644 --- a/packages/pinia/src/createPinia.ts +++ b/packages/pinia/src/createPinia.ts @@ -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) }