mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Document AdminApplication location fix
This commit is contained in:
committed by
Franz Liedke
parent
60dbd3f26c
commit
c8d5ca51bb
@@ -33,6 +33,9 @@ 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.
|
||||
if (!document.location.hash) document.location.hash = '#/';
|
||||
|
||||
m.route.prefix = '#';
|
||||
|
Reference in New Issue
Block a user