We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
extend
beforeMount
1 parent 1cef4c2 commit c9aeda2Copy full SHA for c9aeda2
1 file changed
js/src/forum/index.ts
@@ -1,14 +1,10 @@
1
-import Application from 'flarum/common/Application';
2
-import { extend } from 'flarum/common/extend';
3
import app from 'flarum/forum/app';
4
import MobileTab from './components/MobileTab';
5
6
export { default as extend } from './extend';
7
8
app.initializers.add('acpl/mobile-tab', () => {
9
- //@ts-ignore - missing 'mount' types
10
- extend(Application.prototype, 'mount', () => {
11
- const mTab = document.createElement('div');
12
- m.mount(document.body.appendChild(mTab), MobileTab);
+ app.beforeMount(() => {
+ m.mount(document.body.appendChild(document.createElement('div')), MobileTab);
13
});
14
0 commit comments