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:
Demian Ferreiro 2016-05-27 11:08:47 -03:00
parent b128fd8232
commit 20dfbbadc6

View file

@ -535,7 +535,7 @@ where:
demo.view = function(ctrl) {
return m("div", [
//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"
])
}
```