Skip to content

Commit

Permalink
FLUID-5205: performance adjustment
Browse files Browse the repository at this point in the history
Had been calling the creation event for each conditional panel, when it should have only been called once, when handling the afterRender call.
  • Loading branch information
jobara committed Nov 21, 2013
1 parent 97c05e3 commit deed963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/preferences/js/Panels.js
Expand Up @@ -295,9 +295,9 @@ var fluid_1_5 = fluid_1_5 || {};

fluid.prefs.compositePanel.handleRenderOnPreference = function (that, value, createEvent, componentNames) {
componentNames = fluid.makeArray(componentNames);
that.conditionalCreateEvent(value, createEvent);
fluid.each(componentNames, function (componentName) {
var comp = that[componentName];
that.conditionalCreateEvent(value, createEvent);
if (!value && comp) {
comp.destroy();
}
Expand Down

0 comments on commit deed963

Please sign in to comment.