diff --git a/mithril.js b/mithril.js index a80552fb..60e45911 100644 --- a/mithril.js +++ b/mithril.js @@ -912,7 +912,7 @@ var _14 = function($window) { if (typeof onevent === "function") onevent.call(element, e) return result } - if (key1 in element) element[key1] = callback + if (key1 in element) element[key1] = typeof value2 === "function" ? callback : null else { var eventName = key1.slice(2) if (vnode.events === undefined) vnode.events = {} diff --git a/mithril.min.js b/mithril.min.js index 71c9a814..72e60855 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -30,14 +30,15 @@ if(0