diff options
Diffstat (limited to 'web-ui/app/js/mixins')
| -rw-r--r-- | web-ui/app/js/mixins/with_feature_toggle.js | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/web-ui/app/js/mixins/with_feature_toggle.js b/web-ui/app/js/mixins/with_feature_toggle.js index cf8d0d07..9f4e3759 100644 --- a/web-ui/app/js/mixins/with_feature_toggle.js +++ b/web-ui/app/js/mixins/with_feature_toggle.js @@ -4,12 +4,14 @@ define(['features'],      function withFeatureToggle(componentName, behaviorForFeatureOff) {        return function() { -        this.around('initialize', _.bind(function(basicInitialize) { +        this.around('initialize', _.bind(function(basicInitialize, node, attrs) {            if(features.isEnabled(componentName)) { -            return basicInitialize(arguments[1], arguments[2]); +            return basicInitialize(node, attrs);            }            else if (behaviorForFeatureOff){ -            behaviorForFeatureOff.bind(this).call(); +            behaviorForFeatureOff.call(this); + +            return this;            }          }, this));        }; | 
