From 35252c0a2f3c753ee016412f447fc756e3cbe630 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 31 Oct 2018 10:27:47 +0100 Subject: [PATCH] linked props: rm extra method call and fix bindings creation mistake --- src/client/app/widgets/common/widget.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/app/widgets/common/widget.js b/src/client/app/widgets/common/widget.js index 23c8caae..dc49d62d 100644 --- a/src/client/app/widgets/common/widget.js +++ b/src/client/app/widgets/common/widget.js @@ -156,8 +156,6 @@ class Widget extends EventEmitter { this.errors.id = 'There can only be one root' } - this.createLinkedPropsBindings() - this.disabledProps = [] // cache precision @@ -313,10 +311,10 @@ class Widget extends EventEmitter { widgetManager.on('widget-created', this.linkedCreatedCallback, {context: this}) widgetManager.on('prop-changed', this.linkedPropChangedCallback, {context: this}) - } else if (this.linkedCreatedCallback && !Object.keys(this.linkedPropsValue).length) { + } else if (this.linkedCreatedCallback && !Object.keys(this.linkedProps).length) { - widgetManager.off('widget-created', this.linkedCreatedCallback, this) - widgetManager.off('prop-changed', this.linkedPropChangedCallback, this) + widgetManager.off('widget-created', this.linkedCreatedCallback) + widgetManager.off('prop-changed', this.linkedPropChangedCallback) } @@ -330,7 +328,7 @@ class Widget extends EventEmitter { } else if (this.linkedPropsValueCallback && !Object.keys(this.linkedPropsValue).length) { - widgetManager.off('change', this.linkedValueChangedCallback, this) + widgetManager.off('change', this.linkedValueChangedCallback) }