From 3ec1bb2e74b10bd4d5c1e5c1d04b487b62d37773 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Mon, 2 Jan 2017 01:27:13 +0900 Subject: [PATCH] :up: update(override): change langVM keeping variable name --- src/override.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/override.js b/src/override.js index 1f29d26d0..ae6fe92bd 100644 --- a/src/override.js +++ b/src/override.js @@ -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 }) } @@ -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)