From b6daeaab5aae50f45610e89ed9cec9e860b3c44f Mon Sep 17 00:00:00 2001 From: Bryce Gibson Date: Thu, 22 Dec 2016 21:12:50 +1100 Subject: [PATCH] Fix back button for default route. --- api/router.js | 2 +- mithril.js | 2 +- mithril.min.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/router.js b/api/router.js index ccfccb94..6f805de2 100644 --- a/api/router.js +++ b/api/router.js @@ -15,7 +15,7 @@ module.exports = function($window, redrawService) { if (render != null) redrawService.render(root, render(Vnode(component, attrs.key, attrs))) } var bail = function() { - routeService.setPath(defaultRoute) + routeService.setPath(defaultRoute, null, { replace: true }) } routeService.defineRoutes(routes, function(payload, params, path) { var update = lastUpdate = function(routeResolver, comp) { diff --git a/mithril.js b/mithril.js index a27e1734..104a4dac 100644 --- a/mithril.js +++ b/mithril.js @@ -1098,7 +1098,7 @@ var _20 = function($window, redrawService0) { if (render1 != null) redrawService0.render(root, render1(Vnode(component, attrs3.key, attrs3))) } var bail = function() { - routeService.setPath(defaultRoute) + routeService.setPath(defaultRoute, null, { replace: true }) } routeService.defineRoutes(routes, function(payload, params, path) { var update = lastUpdate = function(routeResolver, comp) { diff --git a/mithril.min.js b/mithril.min.js index f31212e4..dc602474 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -36,6 +36,6 @@ decodeURIComponent(g[1]):"";"true"===g?g=!0:"false"===g&&(g=!1);var l=m.split(/\ l&&(l=m(function(){l=null;a()}))}}function d(a,c,d){var b=a.indexOf("?"),g=a.indexOf("#"),k=-1