Add support for (m.mount + m.route) × (factory + constructible) components
This commit is contained in:
parent
f4fb5ac4be
commit
f273b012c9
2 changed files with 4 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ module.exports = function(redrawService) {
|
|||
return
|
||||
}
|
||||
|
||||
if (component.view == null) throw new Error("m.mount(element, component) expects a component, not a vnode")
|
||||
if (component.view == null && typeof component !== "function") throw new Error("m.mount(element, component) expects a component, not a vnode")
|
||||
|
||||
var run = function() {
|
||||
redrawService.render(root, Vnode(component))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue