Fix location missing on store init (#695)
This commit is contained in:
@@ -212,11 +212,11 @@ Choo.prototype.toString = function (location, state) {
|
||||
|
||||
var self = this
|
||||
this._setCache(this.state)
|
||||
this._matchRoute(location)
|
||||
this._stores.forEach(function (initStore) {
|
||||
initStore(self.state)
|
||||
})
|
||||
|
||||
this._matchRoute(location)
|
||||
var html = this._prerender(this.state)
|
||||
assert.ok(html, 'choo.toString: no valid value returned for the route ' + location)
|
||||
assert(!Array.isArray(html), 'choo.toString: return value was an array for the route ' + location)
|
||||
|
||||
Reference in New Issue
Block a user