diff --git a/js/src/common/Component.ts b/js/src/common/Component.ts index 3659eae66..a22959593 100644 --- a/js/src/common/Component.ts +++ b/js/src/common/Component.ts @@ -121,8 +121,8 @@ export default abstract class Component; + static component(attrs: Attrs = {}, children: Mithril.Children = null): Mithril.Vnode { + const componentAttrs = { ...attrs }; return m(this as any, componentAttrs, children); }