From 20dfcfc39c749a1eb5c140429fb18bc591b1fcf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sevilla=20Marti=CC=81n?= Date: Thu, 27 Jun 2019 14:57:08 -0400 Subject: [PATCH 1/2] Visit home page if no previous route exists Fixes #1777 --- framework/core/js/src/forum/utils/History.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/core/js/src/forum/utils/History.js b/framework/core/js/src/forum/utils/History.js index 0de757ccb..b71b84951 100644 --- a/framework/core/js/src/forum/utils/History.js +++ b/framework/core/js/src/forum/utils/History.js @@ -86,6 +86,10 @@ export default class History { * @public */ back() { + if (! this.canGoBack()) { + return this.home(); + } + this.stack.pop(); m.route(this.getCurrent().url); From 28e5f5cdb2ecb1fcf0ad36cffcb96d6eae630602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sevilla=20Marti=CC=81n?= Date: Thu, 27 Jun 2019 15:07:53 -0400 Subject: [PATCH 2/2] Update CHANGELOG.md --- framework/core/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/core/CHANGELOG.md b/framework/core/CHANGELOG.md index 396135a8d..66265a3e4 100644 --- a/framework/core/CHANGELOG.md +++ b/framework/core/CHANGELOG.md @@ -41,6 +41,7 @@ - FontAwesome component package changed paths in version 5.9.0 ([5eb69e1](https://github.com/flarum/core/commit/5eb69e1f59fa73fdfd5badbf41a05a6a040e7426)) - Some server environments had problems accessing the system-wide tmp path for storing JS file maps ([54660eb](https://github.com/flarum/core/commit/54660ebd6311f9ea142f1b573263d0d907400786)) - Content length of posts.content was not migrated to mediumText in 2017 ([590b311](https://github.com/flarum/core/commit/590b3115708bf94a9c7f169d98c6126380c7056e)) +- An error occurred when going to the previous route if there was no previous route found ([985b87da](https://github.com/flarum/core/commit/985b87da6c9942c568a1a192e2fdcfde72e030ee)) ### Removed - `php flarum install --defaults` - this was meant to be used in our old development VM ([44c9109](https://github.com/flarum/core/commit/44c91099cd77138bb5fc29f14fb1e81a9781272d))