add error message in m.mount

This commit is contained in:
Leo Horie 2016-10-27 20:28:33 -04:00
parent dcdc48a534
commit 93fba4dc1d

View file

@ -11,6 +11,8 @@ module.exports = function(renderer, pubsub) {
delete root.redraw
return
}
if (component.view == null) throw new Error("m.mount(element, component) expects a component, not a vnode")
var run = autoredraw(root, renderer, pubsub, function() {
renderer.render(root, Vnode(component, undefined, undefined, undefined, undefined, undefined))