Skip to content

Commit

Permalink
fix(devtools): avoid running outside of browsers
Browse files Browse the repository at this point in the history
Fix #2843
  • Loading branch information
posva committed Nov 27, 2024
1 parent 31fbff1 commit eb5e6fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pinia/src/createPinia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit eb5e6fd

Please sign in to comment.