mirror of
https://github.com/flarum/core.git
synced 2025-10-15 08:55:53 +02:00
Initialise component state in init() instead of constructor
This allows component state to be overridden via monkey-patch. ref #246
This commit is contained in:
@@ -3,9 +3,7 @@ import Button from 'flarum/components/Button';
|
||||
import saveSettings from 'flarum/utils/saveSettings';
|
||||
|
||||
export default class EditCustomCssModal extends Modal {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
init() {
|
||||
this.customLess = m.prop(app.settings.custom_less || '');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user