don't cast to boolean

This commit is contained in:
Leo Horie 2016-08-12 23:55:45 -04:00
parent 6c3036e5c6
commit 9c16ece556

View file

@ -5,7 +5,7 @@ var Vnode = require("../render/vnode")
var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
var selectorCache = {}
function hyperscript(selector) {
if (selector == null || typeof selector !== "string" && !selector.view) {
if (selector == null || typeof selector !== "string" && selector.view == null) {
throw Error("The selector must be either a string or a component.");
}