check that selector.view is a function
This commit is contained in:
parent
542b87889b
commit
f59402718b
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ var Vnode = require("../render/vnode")
|
||||||
var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
|
var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
|
||||||
var selectorCache = {}
|
var selectorCache = {}
|
||||||
function hyperscript(selector) {
|
function hyperscript(selector) {
|
||||||
if (selector == null || typeof selector !== "string" && selector.view == null) {
|
if (selector == null || typeof selector !== "string" && typeof selector.view !== "function") {
|
||||||
throw Error("The selector must be either a string or a component.");
|
throw Error("The selector must be either a string or a component.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue