Skip to content

Commit

Permalink
🆙 update(override): change langVM keeping variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Jan 1, 2017
1 parent 9e5307c commit 3ec1bb2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/override.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default function (Vue, langVM, version) {
init.call(this, options)

if (!this.$parent) { // root
this.$lang = langVM
this._langUnwatch = this.$lang.$watch('$data', (val, old) => {
this._$lang = langVM
this._langUnwatch = this._$lang.$watch('$data', (val, old) => {
update(this)
}, { deep: true })
}
Expand All @@ -29,7 +29,7 @@ export default function (Vue, langVM, version) {
if (!this.$parent && this._langUnwatch) {
this._langUnwatch()
this._langUnwatch = null
this.$lang = null
this._$lang = null
}

destroy.apply(this, arguments)
Expand Down

0 comments on commit 3ec1bb2

Please sign in to comment.