diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 30c39524..ab8484ef 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,3 +9,4 @@ package.json @tivac README.md @tivac docs/ @tivac performance/ @tivac +render/ @isiahmeadows diff --git a/docs/change-log.md b/docs/change-log.md index cb2fabf0..64c727c8 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -1,5 +1,7 @@ # Change log +- [v2.0.0](#v113) +- [v1.1.4](#v113) - [v1.1.3](#v113) - [v1.1.2](#v112) - [v1.1.1](#v111) @@ -27,6 +29,14 @@ --- +### v1.1.4 + +#### Bug fixes: + +- core: don't call `onremove` on the children of components that return null from the view [#1921](https://github.com/MithrilJS/mithril.js/issues/1921) [octavore](https://github.com/octavore) ([#1922](https://github.com/MithrilJS/mithril.js/pull/1922)) + +--- + ### v1.1.3 #### Bug fixes: diff --git a/docs/route.md b/docs/route.md index 16a08eec..a8f7a2fe 100644 --- a/docs/route.md +++ b/docs/route.md @@ -568,7 +568,7 @@ var Login = { return m("form", [ m("input[type=text]", {oninput: m.withAttr("value", Auth.setUsername), value: Auth.username}), m("input[type=password]", {oninput: m.withAttr("value", Auth.setPassword), value: Auth.password}), - m("button[type=button]", {onclick: Auth.login, "Login") + m("button[type=button]", {onclick: Auth.login}, "Login") ]) } } diff --git a/mithril.js b/mithril.js index 6fbf4ff8..77e3c6d9 100644 --- a/mithril.js +++ b/mithril.js @@ -806,9 +806,10 @@ var coreRenderer = function($window) { } function onremove(vnode) { if (vnode.attrs && typeof vnode.attrs.onremove === "function") vnode.attrs.onremove.call(vnode.state, vnode) - if (typeof vnode.tag !== "string" && typeof vnode._state.onremove === "function") vnode._state.onremove.call(vnode.state, vnode) - if (vnode.instance != null) onremove(vnode.instance) - else { + if (typeof vnode.tag !== "string") { + if (typeof vnode._state.onremove === "function") vnode._state.onremove.call(vnode.state, vnode) + if (vnode.instance != null) onremove(vnode.instance) + } else { var children = vnode.children if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { diff --git a/mithril.min.js b/mithril.min.js index c9fd686f..c68ee276 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -27,7 +27,7 @@ a.text):(null!=c.text&&(c.children=[z("#",void 0,void 0,c.text,void 0,c.dom.firs a.dom=a.instance.dom,a.domSize=a.instance.domSize):null!=c.instance?(y(c.instance,null),a.dom=void 0,a.domSize=0):(a.dom=c.dom,a.domSize=c.domSize)}}else y(c,null),e(k,a,b,m,d)}function r(a){var c=a.domSize;if(null!=c||null==a.dom){var b=x.createDocumentFragment();if(0