Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Commit 3ec1bb2

Browse files
committed
🆙 update(override): change langVM keeping variable name
1 parent 9e5307c commit 3ec1bb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/override.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export default function (Vue, langVM, version) {
1616
init.call(this, options)
1717

1818
if (!this.$parent) { // root
19-
this.$lang = langVM
20-
this._langUnwatch = this.$lang.$watch('$data', (val, old) => {
19+
this._$lang = langVM
20+
this._langUnwatch = this._$lang.$watch('$data', (val, old) => {
2121
update(this)
2222
}, { deep: true })
2323
}
@@ -29,7 +29,7 @@ export default function (Vue, langVM, version) {
2929
if (!this.$parent && this._langUnwatch) {
3030
this._langUnwatch()
3131
this._langUnwatch = null
32-
this.$lang = null
32+
this._$lang = null
3333
}
3434

3535
destroy.apply(this, arguments)

0 commit comments

Comments
 (0)