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

Commit 07a596bb by Mick Hansen

Merge pull request #4698 from FrederikNS/master

Fixed the Getting Started Promise documentation
2 parents 217ba180 52793dc4
Showing with 2 additions and 2 deletions
...@@ -89,7 +89,7 @@ Basically a promise represents a value which will be present at some point - "I ...@@ -89,7 +89,7 @@ Basically a promise represents a value which will be present at some point - "I
```js ```js
// DON'T DO THIS // DON'T DO THIS
user = User.findAll() user = User.findOne()
console.log(user.name); console.log(user.name);
``` ```
...@@ -97,7 +97,7 @@ console.log(user.name); ...@@ -97,7 +97,7 @@ console.log(user.name);
_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: _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 ```js
User.findAll().then(function (user) { User.findOne().then(function (user) {
console.log(user.name); console.log(user.name);
}); });
``` ```
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!