From dfb37fec9cd25ca5f18282cbe97120dc69dad43a Mon Sep 17 00:00:00 2001 From: Gilbert Date: Fri, 1 May 2015 15:31:06 -0500 Subject: [PATCH] Add `catch` to promise-like objects --- mithril.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mithril.js b/mithril.js index 707d09aa..d5e55d84 100644 --- a/mithril.js +++ b/mithril.js @@ -859,6 +859,7 @@ var m = (function app(window, undefined) { prop.then = function(resolve, reject) { return propify(promise.then(resolve, reject), initialValue) }; + prop.catch = prop.then.bind(null, null) return prop } //Promiz.mithril.js | Zolmeister | MIT