Populate state.query before calling router (#575)

Ensure querystring parameters are available to views.
This commit is contained in:
Simon Lawrence
2017-10-08 13:58:27 -04:00
committed by Yoshua Wuyts
parent 04973020c1
commit 8595f1f765
+1 -1
View File
@@ -128,8 +128,8 @@ Choo.prototype.start = function () {
}
this.state.href = this._createLocation()
this._tree = this.router(this.state.href)
this.state.query = nanoquery(window.location.search)
this._tree = this.router(this.state.href)
assert.ok(this._tree, 'choo.start: no valid DOM node returned for location ' + this.state.href)
this.emitter.prependListener(self._events.RENDER, nanoraf(function () {