From d1f675a6e192cce961bdf538cc4e9cec9edc583b Mon Sep 17 00:00:00 2001 From: Ilkka Huotari Date: Fri, 25 Jul 2014 04:24:39 +0000 Subject: [PATCH 1/2] Added params.backbutton --- lib/History.js | 1 + lib/router.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/History.js b/lib/History.js index e844fea..54b0607 100644 --- a/lib/History.js +++ b/lib/History.js @@ -206,6 +206,7 @@ function addListeners(history) { var options = { previous: previous , url: currentPath + , backbutton: true } if (state) { diff --git a/lib/router.js b/lib/router.js index 6340ce3..e0af1e3 100644 --- a/lib/router.js +++ b/lib/router.js @@ -137,5 +137,6 @@ RenderReq.prototype.routeParams = function(route) { params.body = this.body params.query = this.query params.method = this.method + params.backbutton = this.options.backbutton return params } From 79184b71f147d43ce90d072d8609c12ec6734a4f Mon Sep 17 00:00:00 2001 From: Ilkka Huotari Date: Fri, 24 Oct 2014 04:20:49 +0000 Subject: [PATCH 2/2] check if options exists --- lib/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/router.js b/lib/router.js index e0af1e3..10662ce 100644 --- a/lib/router.js +++ b/lib/router.js @@ -137,6 +137,6 @@ RenderReq.prototype.routeParams = function(route) { params.body = this.body params.query = this.query params.method = this.method - params.backbutton = this.options.backbutton + params.backbutton = this.options && this.options.backbutton return params }