From 94d3bea53ee44b7d114dcbc2139ed404bb287160 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sat, 15 Aug 2020 20:07:24 -0400 Subject: [PATCH] Fix initAttrs being made static --- js/src/common/Component.ts | 2 +- js/src/common/components/LinkButton.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/common/Component.ts b/js/src/common/Component.ts index ad9e6d87f..765abc60e 100644 --- a/js/src/common/Component.ts +++ b/js/src/common/Component.ts @@ -64,7 +64,7 @@ export default abstract class Component implemen } private setAttrs(attrs: T = {} as T) { - this.initAttrs(attrs); + this.constructor.initAttrs(attrs); if (attrs) { if ('children' in attrs) { diff --git a/js/src/common/components/LinkButton.js b/js/src/common/components/LinkButton.js index 741bc5ceb..edd272fd4 100644 --- a/js/src/common/components/LinkButton.js +++ b/js/src/common/components/LinkButton.js @@ -16,7 +16,7 @@ export default class LinkButton extends Button { static initAttrs(attrs) { super.initAttrs(attrs); - attrs.active = this.constructor.isActive(attrs); + attrs.active = this.isActive(attrs); } view(vnode) {