Bundled output for commit b9639dc485 [skip ci]

This commit is contained in:
Gandalf-the-Bot 2017-02-18 14:47:21 +00:00
parent b9639dc485
commit 68daa36e71
2 changed files with 9 additions and 8 deletions

View file

@ -966,7 +966,7 @@ var _16 = function(redrawService0) {
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 run0 = function() {
redrawService0.render(root, Vnode(component))
@ -1119,11 +1119,12 @@ var _20 = function($window, redrawService0) {
routeService.defineRoutes(routes, function(payload, params, path) {
var update = lastUpdate = function(routeResolver, comp) {
if (update !== lastUpdate) return
component = comp != null && typeof comp.view === "function" ? comp : "div", attrs3 = params, currentPath = path, lastUpdate = null
component = comp != null && (typeof comp.view === "function" || typeof comp === "function")? comp : "div"
attrs3 = params, currentPath = path, lastUpdate = null
render1 = (routeResolver.render || identity).bind(routeResolver)
run1()
}
if (payload.view) update({}, payload)
if (payload.view || typeof payload === "function") update({}, payload)
else {
if (payload.onmatch) {
Promise.resolve(payload.onmatch(params, path)).then(function(resolved) {