diff --git a/docs/change-log.md b/docs/change-log.md index ae72b5ae..9ec18373 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -27,6 +27,7 @@ - hyperscript: when attributes have a `null` or `undefined` value, they are treated as if they were absent. [#1773](https://github.com/MithrilJS/mithril.js/issues/1773) ([#2174](https://github.com/MithrilJS/mithril.js/pull/2174)) - hyperscript: when an attribute is defined on both the first and second argument (as a CSS selector and an `attrs` field, respectively), the latter takes precedence, except for `class` attributes that are still added together. [#2172](https://github.com/MithrilJS/mithril.js/issues/2172) ([#2174](https://github.com/MithrilJS/mithril.js/pull/2174)) - stream: when a stream conditionally returns HALT, dependant stream will also end ([#2200](https://github.com/MithrilJS/mithril.js/pull/2200)) +- render: remove some redundancy within the component initialization code ([#2213](https://github.com/MithrilJS/mithril.js/pull/2213)) #### News diff --git a/mithril.js b/mithril.js index aaae3c1b..5e0c9c5e 100644 --- a/mithril.js +++ b/mithril.js @@ -410,7 +410,6 @@ var _9 = function($window, Promise) { var requestService = _9(window, PromisePolyfill) var coreRenderer = function($window) { var $doc = $window.document - var $emptyFragment = $doc.createDocumentFragment() var nameSpace = { svg: "http://www.w3.org/2000/svg", math: "http://www.w3.org/1998/Math/MathML" @@ -530,12 +529,12 @@ var coreRenderer = function($window) { if (typeof vnode.tag.view === "function") { vnode.state = Object.create(vnode.tag) sentinel = vnode.state.view - if (sentinel.$$reentrantLock$$ != null) return $emptyFragment + if (sentinel.$$reentrantLock$$ != null) return sentinel.$$reentrantLock$$ = true } else { vnode.state = void 0 sentinel = vnode.tag - if (sentinel.$$reentrantLock$$ != null) return $emptyFragment + if (sentinel.$$reentrantLock$$ != null) return sentinel.$$reentrantLock$$ = true vnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === "function") ? new vnode.tag(vnode) : vnode.tag(vnode) } diff --git a/mithril.min.js b/mithril.min.js index 1722b606..8e0ffe9a 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -34,13 +34,13 @@ a.domSize||1;if(1