mirror of
https://github.com/flarum/core.git
synced 2025-08-09 01:46:35 +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);
|
return m(this as any, componentProps, children);
|
||||||
}
|
}
|
||||||
|
|
||||||
private setAttrs(attrs: T) {
|
private setAttrs(attrs: T = {} as T) {
|
||||||
this.initAttrs(attrs);
|
this.initAttrs(attrs);
|
||||||
|
|
||||||
if (attrs && 'children' in attrs) {
|
if (attrs && 'children' in attrs) {
|
||||||
|
Reference in New Issue
Block a user