Skip to content

Commit

Permalink
🐛 bug(install): fix cannot redfine error
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Sep 25, 2018
1 parent 40bcdef commit 6d5ec61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}).`)
Expand Down

0 comments on commit 6d5ec61

Please sign in to comment.