1
0
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:
Alexander Skvortsov
2020-08-08 13:57:57 -04:00
committed by Franz Liedke
parent 98740472a8
commit 74f6a3e6ce

View File

@@ -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) {