m.request: fix sample code in documentation

This commit is contained in:
Masayuki Takeda 2015-08-28 22:18:46 +09:00
parent d3cbbef4d5
commit f9953b8f74

View file

@ -408,7 +408,7 @@ demo.controller = function() {
demo.view = function(ctrl) {
//This view gets rendered before the request above completes
//Calling .map doesn't throw an error because we defined the initial value to be an empty array, instead of undefined
return ctrl.users().map(function() {
return ctrl.users().map(function(user) {
return m("div", user.name)
})
}