Yes – it looks like the variables you intended to create are just being reassigned each call. You should scope the variables to to the function using var
before each:
var conditions, toggleControl; // here.
conditions = condition_toggled.split(',');
toggleControl = function toggleControl(value) {
conditions.forEach(function(condition) {
var cond_display_control, controllers; // here.
//this will get the condition that will result in display
//and controllers of displayed items
cond_display_control = condition.split('|');
//separates out the controllers to be displayed
controllers = cond_display_control[1].split('^');
if (value == cond_display_control[0]) {
controllers.forEach(function(controller) {
wp.customize.control(controller).toggle(true);
});
} else {
controllers.forEach(function(controller) {
wp.customize.control(controller).toggle(false);
});
}
});
};