From 20dfbbadc6460e9e838e39935c5e8b288a14cd76 Mon Sep 17 00:00:00 2001 From: Demian Ferreiro Date: Fri, 27 May 2016 11:08:47 -0300 Subject: [PATCH] Update mithril.request.md Add call to promise returned by m.request(). Otherwise the value of `ctrl.user` will always be truthy. --- docs/mithril.request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mithril.request.md b/docs/mithril.request.md index fb29d28e..b6d071c7 100644 --- a/docs/mithril.request.md +++ b/docs/mithril.request.md @@ -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" ]) } ```