Skip to content

Commit

Permalink
fix vm.$log when property is not observed or does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 30, 2014
1 parent cfade3f commit 8899672
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/api/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 8899672

Please sign in to comment.