From 8595f1f765cf1e76d5106d4a5eb3a740477aab49 Mon Sep 17 00:00:00 2001 From: Simon Lawrence Date: Sun, 8 Oct 2017 19:58:27 +0200 Subject: [PATCH] Populate state.query before calling router (#575) Ensure querystring parameters are available to views. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 20eec08..86910aa 100644 --- a/index.js +++ b/index.js @@ -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 () {