3 ms·
In mithril promises if you return undefined from then, the promise will fulfill with the previous value, I.E. it behaves like .tap in other promise libraries (b
by esailija 12y ago
In mithril promises if you return undefined from then, the promise will fulfill with the previous value, I.E. it behaves like .tap in other promise libraries (because doing this in a .then like mithril does violates the spec - which is evidently surprising)
However, with unbound console.log the code doesn't work at all, this is the case in Chrome for example.
- bendrucker 12y agoThe breaks from A+ are pretty serious, both the treatment of undefined and releasing zalgo (http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony http://blog.izs.me/post/59142742143/designing-apis-for-async...) and calling it a feature. Not on the hunt for a client side micro-framework but since I use a lot of modules that supply promises there's no way I'd use this.