Update mithril.request.md
Add call to promise returned by m.request(). Otherwise the value of `ctrl.user` will always be truthy.
This commit is contained in:
parent
b128fd8232
commit
20dfbbadc6
1 changed files with 1 additions and 1 deletions
|
|
@ -535,7 +535,7 @@ where:
|
||||||
demo.view = function(ctrl) {
|
demo.view = function(ctrl) {
|
||||||
return m("div", [
|
return m("div", [
|
||||||
//in the first redraw, there's no user, so ensure we don't throw an error
|
//in the first redraw, there's no user, so ensure we don't throw an error
|
||||||
ctrl.user ? ctrl.user.name : "no user"
|
ctrl.user() ? ctrl.user().name : "no user"
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue