1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 07:57:46 +02:00

Update comment

Who cares about Mithril 0.2? ;)
This commit is contained in:
Franz Liedke
2020-09-17 01:29:14 +02:00
parent 537e2690e8
commit 6f11567f91

View File

@@ -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 = '#';