Skip to content

Commit eb5e6fd

Browse files
committed
fix(devtools): avoid running outside of browsers
Fix #2843
1 parent 31fbff1 commit eb5e6fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/pinia/src/createPinia.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function createPinia(): Pinia {
5757

5858
// pinia devtools rely on dev only features so they cannot be forced unless
5959
// the dev build of Vue is used. Avoid old browsers like IE11.
60-
if (__USE_DEVTOOLS__ && typeof Proxy !== 'undefined') {
60+
if (__USE_DEVTOOLS__ && IS_CLIENT && typeof Proxy !== 'undefined') {
6161
pinia.use(devtoolsPlugin)
6262
}
6363

0 commit comments

Comments
 (0)