mirror of
https://github.com/flarum/core.git
synced 2025-08-07 17:07:19 +02:00
Set empty object as default attrs for all components
This commit is contained in:
committed by
Franz Liedke
parent
98740472a8
commit
74f6a3e6ce
@@ -63,7 +63,7 @@ export default abstract class Component<T extends ComponentAttrs = any> implemen
|
||||
return m(this as any, componentProps, children);
|
||||
}
|
||||
|
||||
private setAttrs(attrs: T) {
|
||||
private setAttrs(attrs: T = {} as T) {
|
||||
this.initAttrs(attrs);
|
||||
|
||||
if (attrs && 'children' in attrs) {
|
||||
|
Reference in New Issue
Block a user