diff --git a/src/install.js b/src/install.js index a93ce41ce..d2c5e84e5 100644 --- a/src/install.js +++ b/src/install.js @@ -7,16 +7,16 @@ import { bind, update, unbind } from './directive' export let Vue export function install (_Vue) { - Vue = _Vue - - const version = (Vue.version && Number(Vue.version.split('.')[0])) || -1 /* istanbul ignore if */ - if (process.env.NODE_ENV !== 'production' && install.installed) { + if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) { warn('already installed.') return } install.installed = true + Vue = _Vue + + const version = (Vue.version && Number(Vue.version.split('.')[0])) || -1 /* istanbul ignore if */ if (process.env.NODE_ENV !== 'production' && version < 2) { warn(`vue-i18n (${install.version}) need to use Vue 2.0 or later (Vue: ${Vue.version}).`)