{"action":"created","issue":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/479","labels_url":"https://api.github.com/repos/lhorie/mithril.js/issues/479/labels{/name}","comments_url":"https://api.github.com/repos/lhorie/mithril.js/issues/479/comments","events_url":"https://api.github.com/repos/lhorie/mithril.js/issues/479/events","html_url":"https://github.com/lhorie/mithril.js/issues/479","id":60534878,"number":479,"title":"promise.then( m.redraw ) doesn't trigger","user":{"login":"barneycarroll","id":83627,"avatar_url":"https://avatars.githubusercontent.com/u/83627?v=3","gravatar_id":"","url":"https://api.github.com/users/barneycarroll","html_url":"https://github.com/barneycarroll","followers_url":"https://api.github.com/users/barneycarroll/followers","following_url":"https://api.github.com/users/barneycarroll/following{/other_user}","gists_url":"https://api.github.com/users/barneycarroll/gists{/gist_id}","starred_url":"https://api.github.com/users/barneycarroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barneycarroll/subscriptions","organizations_url":"https://api.github.com/users/barneycarroll/orgs","repos_url":"https://api.github.com/users/barneycarroll/repos","events_url":"https://api.github.com/users/barneycarroll/events{/privacy}","received_events_url":"https://api.github.com/users/barneycarroll/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-10T17:13:58Z","updated_at":"2015-03-11T13:39:53Z","closed_at":"2015-03-11T13:39:53Z","body":"I'm having difficulty reproducing a rather odd bug. I'm using background m.requests throughout my application. For ages I've been trying to track down a bug whereby the interface was always one redraw behind WRT sequentially loaded data. I managed to eliminate it by replacing instances of:\r\n\r\n    var x = m.request();\r\n\r\n    x.then( redraw );\r\n\r\n…with:\r\n\r\n    var x = m.request();\r\n\r\n    x.then( function(){\r\n      m.redraw();\r\n    } );\r\n\r\nThe above is an oversimplification – I'm using wrapper interfaces to retrieve the relevant thennables – and if I try to reproduce the bug with m.deferreds it's a non-issue ([I would expect this to fail to redraw after the timeout, but it doesn't](http://jsbin.com/xezixi/1/edit?js,console,output)).\r\n\r\nAny ideas, anyone?"},"comment":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/comments/78264151","html_url":"https://github.com/lhorie/mithril.js/issues/479#issuecomment-78264151","issue_url":"https://api.github.com/repos/lhorie/mithril.js/issues/479","id":78264151,"user":{"login":"barneycarroll","id":83627,"avatar_url":"https://avatars.githubusercontent.com/u/83627?v=3","gravatar_id":"","url":"https://api.github.com/users/barneycarroll","html_url":"https://github.com/barneycarroll","followers_url":"https://api.github.com/users/barneycarroll/followers","following_url":"https://api.github.com/users/barneycarroll/following{/other_user}","gists_url":"https://api.github.com/users/barneycarroll/gists{/gist_id}","starred_url":"https://api.github.com/users/barneycarroll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barneycarroll/subscriptions","organizations_url":"https://api.github.com/users/barneycarroll/orgs","repos_url":"https://api.github.com/users/barneycarroll/repos","events_url":"https://api.github.com/users/barneycarroll/events{/privacy}","received_events_url":"https://api.github.com/users/barneycarroll/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T13:39:53Z","updated_at":"2015-03-11T13:39:53Z","body":"Right – my case always failed in passed situations. I can only assume the intermediary interfaces aren't facading `then` properly. I'll close this until I can isolate the issue."}}