Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
unifyObjectStyle
} from './store-util'

const isBrowser = typeof document !== 'undefined'

export function createStore (options) {
return new Store(options)
}
Expand Down Expand Up @@ -73,9 +75,9 @@ export class Store {
app.provide(injectKey || storeKey, this)
app.config.globalProperties.$store = this

const useDevtools = this._devtools !== undefined
const useDevtools = (this._devtools !== undefined
? this._devtools
: __DEV__ || __VUE_PROD_DEVTOOLS__
: __DEV__ || __VUE_PROD_DEVTOOLS__) && isBrowser

if (useDevtools) {
addDevtools(app, this)
Expand Down
Loading