Skip to content
Permalink
Browse files

MINOR Avoid breaking IE on CMS ajax responses which don't contain CSS…

… class names (splitting on NULL) (#7002)
  • Loading branch information...
chillu committed Mar 30, 2012
1 parent c518a19 commit 3f4aba55454f5c27486e208a9517ed1c65ead2a9
Showing with 7 additions and 6 deletions.
  1. +7 −6 admin/javascript/LeftAndMain.js
@@ -223,12 +223,13 @@ jQuery.noConflict();
var layoutClasses = ['east', 'west', 'center', 'north', 'south'];
var elemClasses = contentEl.attr('class');

var origLayoutClasses = $.grep(
elemClasses.split(' '),
function(val) {
return ($.inArray(val, layoutClasses) >= 0);
}
);
var origLayoutClasses = '';
if(elemClasses) {
origLayoutClasses = $.grep(
elemClasses.split(' '),
function(val) { return ($.inArray(val, layoutClasses) >= 0);}
);
}

newContentEl
.removeClass(layoutClasses.join(' '))

0 comments on commit 3f4aba5

Please sign in to comment.
You can’t perform that action at this time.