Skip to content

Commit dd7f817

Browse files
ktsnyyx990803
authored andcommitted
perf: do not connect devtools if Vue.config.devtools == false (#881)
1 parent 5c0050b commit dd7f817

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/store.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ export class Store {
5858
resetStoreVM(this, state)
5959

6060
// apply plugins
61-
plugins.concat(devtoolPlugin).forEach(plugin => plugin(this))
61+
plugins.forEach(plugin => plugin(this))
62+
63+
if (Vue.config.devtools) {
64+
devtoolPlugin(this)
65+
}
6266
}
6367

6468
get state () {

0 commit comments

Comments
 (0)