From b1fa6f19af27e5c8aa3aa2ea8179d814e506fa5e Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Wed, 14 Mar 2018 12:25:26 +0100 Subject: [PATCH] move ._handler off state (#637) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 811dba3..c29ab82 100644 --- a/index.js +++ b/index.js @@ -222,17 +222,17 @@ Choo.prototype._matchRoute = function (locationOverride) { queryString = window.location.search } var matched = this.router.match(location) + this._handler = matched.cb this.state.href = location this.state.query = nanoquery(queryString) this.state.route = matched.route this.state.params = matched.params - this.state._handler = matched.cb return this.state } Choo.prototype._prerender = function (state) { var routeTiming = nanotiming("choo.prerender('" + state.route + "')") - var res = state._handler(state, this.emit) + var res = this._handler(state, this.emit) routeTiming() return res }