From baa2dc1ab0ab20beac648466a8f17acea5b3a226 Mon Sep 17 00:00:00 2001 From: Isiah Meadows Date: Wed, 29 Mar 2017 18:22:27 -0400 Subject: [PATCH] Revert "Merge pull request #1753 from StephanHoyer/master" This reverts commit 000eec90d85324df34fc51827d6c2bf2d75e11d9, reversing changes made to e88bddb3c8fe1e0dd834e89d9436524b51558e6f. --- render/hyperscript.js | 2 +- render/tests/test-hyperscript.js | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/render/hyperscript.js b/render/hyperscript.js index ece288fc..24151431 100644 --- a/render/hyperscript.js +++ b/render/hyperscript.js @@ -73,7 +73,7 @@ function hyperscript(selector) { var cached = selectorCache[selector] || compileSelector(selector) } - if (attrs == null) { + if (!attrs) { attrs = {} } else if (typeof attrs !== "object" || attrs.tag != null || Array.isArray(attrs)) { attrs = {} diff --git a/render/tests/test-hyperscript.js b/render/tests/test-hyperscript.js index cf0b3155..2264fe18 100644 --- a/render/tests/test-hyperscript.js +++ b/render/tests/test-hyperscript.js @@ -273,11 +273,6 @@ o.spec("hyperscript", function() { o(vnode.children[0]).equals(null) o(vnode.children[1]).equals(undefined) }) - o("handles falsy number single child without attrs", function() { - var vnode = m("div", 0) - - o(vnode.text).equals(0) - }) }) o.spec("permutations", function() { o("handles null attr and children", function() {