fix migration example

This commit is contained in:
Leo 2017-02-14 08:15:38 -05:00
parent 6dd9394fef
commit dc3d5f8494
2 changed files with 8 additions and 6 deletions

View file

@ -95,7 +95,7 @@ Let's wrap our text in an `<h1>` tag.
m.render(root, m("h1", "My first app"))
```
The `m()` function can be used to describe any HTML structure you want. So if you to add a class to the `<h1>`:
The `m()` function can be used to describe any HTML structure you want. So if you need to add a class to the `<h1>`:
```javascript
m("h1", {class: "title"}, "My first app")

View file

@ -635,11 +635,13 @@ greetAsync()
### `v1.x`
```javascript
var greetAsync = new Promise(function(resolve){
setTimeout(function() {
resolve("hello")
}, 1000)
})
var greetAsync = function() {
return new Promise(function(resolve){
setTimeout(function() {
resolve("hello")
}, 1000)
})
}
greetAsync()
.then(function(value) {return value + " world"})