From 6f11567f91a5099fb459f38e883d9c3a6563083e Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 17 Sep 2020 01:29:14 +0200 Subject: [PATCH] Update comment Who cares about Mithril 0.2? ;) --- js/src/admin/AdminApplication.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/src/admin/AdminApplication.js b/js/src/admin/AdminApplication.js index 61fcbeb03..03669d6e0 100644 --- a/js/src/admin/AdminApplication.js +++ b/js/src/admin/AdminApplication.js @@ -33,9 +33,8 @@ export default class AdminApplication extends Application { m.mount(document.getElementById('header-secondary'), HeaderSecondary); m.mount(document.getElementById('admin-navigation'), AdminNav); - // With mithril 0.2.x, mithril redirects to the route with the hash automatically. - // With 2.x, it does not do that, so it doesn't display the home route in the admin. - // This code makes sure that going to https://example.com/admin takes us to the right page. + // Mithril does not render the home route on https://example.com/admin, so + // we need to go to https://example.com/admin#/ explicitly. if (!document.location.hash) document.location.hash = '#/'; m.route.prefix = '#';