MINOR Avoid breaking IE on CMS ajax responses which don't contain CSS class names (splitting on NULL) (#7002)

This commit is contained in:
Ingo Schommer 2012-03-30 15:23:39 +02:00
parent c518a19ec2
commit 3f4aba5545

View File

@ -223,12 +223,13 @@ jQuery.noConflict();
var layoutClasses = ['east', 'west', 'center', 'north', 'south']; var layoutClasses = ['east', 'west', 'center', 'north', 'south'];
var elemClasses = contentEl.attr('class'); var elemClasses = contentEl.attr('class');
var origLayoutClasses = $.grep( var origLayoutClasses = '';
if(elemClasses) {
origLayoutClasses = $.grep(
elemClasses.split(' '), elemClasses.split(' '),
function(val) { function(val) { return ($.inArray(val, layoutClasses) >= 0);}
return ($.inArray(val, layoutClasses) >= 0);
}
); );
}
newContentEl newContentEl
.removeClass(layoutClasses.join(' ')) .removeClass(layoutClasses.join(' '))