fix vm.$log when property is not observed or does not exist

This commit is contained in:
Evan You 2014-11-30 14:22:46 -05:00
parent cfade3fa32
commit 88996727f5
1 changed files with 5 additions and 2 deletions

View File

@ -152,7 +152,10 @@ exports.$interpolate = function (text) {
exports.$log = function (path) {
var data = path
? Path.get(this, path)
? Path.get(this._data, path)
: this._data
console.log(JSON.parse(JSON.stringify(data)))
if (data) {
data = JSON.parse(JSON.stringify(data))
}
console.log(data)
}