Skip to content

Commit bfa81db

Browse files
committed
prevent multiple installs (#136)
1 parent 5e0b247 commit bfa81db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ class Store {
255255
}
256256

257257
function install (_Vue) {
258+
if (Vue) {
259+
console.warn(
260+
'[vuex] already installed. Vue.use(Vuex) should be called only once.'
261+
)
262+
return
263+
}
258264
Vue = _Vue
259265
override(Vue)
260266
}

0 commit comments

Comments
 (0)