From: Eduardo San Martin Morote Date: Wed, 27 Nov 2024 14:36:48 +0000 (+0100) Subject: fix(devtools): avoid running outside of browsers X-Git-Tag: v2.2.7~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb5e6fd6073da8e828a9087c876d0e8fde3cdb3d;p=thirdparty%2Fvuejs%2Fpinia.git fix(devtools): avoid running outside of browsers Fix #2843 --- diff --git a/packages/pinia/src/createPinia.ts b/packages/pinia/src/createPinia.ts index eb7dc723..7749247a 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) }