mirror of https://github.com/vuejs/vue.git
fix vm.$log when property is not observed or does not exist
This commit is contained in:
parent
cfade3fa32
commit
88996727f5
|
|
@ -152,7 +152,10 @@ exports.$interpolate = function (text) {
|
||||||
|
|
||||||
exports.$log = function (path) {
|
exports.$log = function (path) {
|
||||||
var data = path
|
var data = path
|
||||||
? Path.get(this, path)
|
? Path.get(this._data, path)
|
||||||
: this._data
|
: this._data
|
||||||
console.log(JSON.parse(JSON.stringify(data)))
|
if (data) {
|
||||||
|
data = JSON.parse(JSON.stringify(data))
|
||||||
|
}
|
||||||
|
console.log(data)
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue