不要怂,就是干,撸起袖子干!

Commit b5498b41 by Bertola Lucas Committed by Jan Aagaard Meier

[ci skip] fix getting started example (#5758)

* fix example

* use get method
1 parent ecbc1839
Showing with 2 additions and 2 deletions
......@@ -91,14 +91,14 @@ Basically a promise represents a value which will be present at some point - "I
// DON'T DO THIS
user = User.findOne()
console.log(user.name);
console.log(user.get('firstName'));
```
_will never work!_ This is because `user` is a promise object, not a data row from the DB. The right way to do it is:
```js
User.findOne().then(function (user) {
console.log(user.name);
console.log(user.get('firstName'));
});
```
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!