add support for hyperscript in choo.toString (#635)

* add failing test for hyperscript (#634)

* add support for hyperscript in choo.toString (#634)
This commit is contained in:
Nate Goldman
2018-03-05 08:11:07 -08:00
committed by GitHub
parent 6bee7086bc
commit cf1f99b94a
3 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ Choo.prototype.toString = function (location, state) {
this._matchRoute(location)
var html = this._prerender(this.state)
assert.ok(html, 'choo.toString: no valid value returned for the route ' + location)
return html.toString()
return typeof html.outerHTML === 'string' ? html.outerHTML : html.toString()
}
Choo.prototype._matchRoute = function (locationOverride) {