Skip to content
This repository
Browse code

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

… class names (splitting on NULL) (#7002)
  • Loading branch information...
commit 3f4aba55454f5c27486e208a9517ed1c65ead2a9 1 parent c518a19
Ingo Schommer authored March 30, 2012

Showing 1 changed file with 7 additions and 6 deletions. Show diff stats Hide diff stats

  1. 13  admin/javascript/LeftAndMain.js
13  admin/javascript/LeftAndMain.js
@@ -223,12 +223,13 @@ jQuery.noConflict();
223 223
 						var layoutClasses = ['east', 'west', 'center', 'north', 'south'];
224 224
 						var elemClasses = contentEl.attr('class');
225 225
 						
226  
-						var origLayoutClasses = $.grep(
227  
-							elemClasses.split(' '),
228  
-							function(val) { 
229  
-								return ($.inArray(val, layoutClasses) >= 0);
230  
-							}
231  
-						);
  226
+						var origLayoutClasses = '';
  227
+						if(elemClasses) {
  228
+							origLayoutClasses = $.grep(
  229
+								elemClasses.split(' '),
  230
+								function(val) { return ($.inArray(val, layoutClasses) >= 0);}
  231
+							);
  232
+						}
232 233
 						
233 234
 						newContentEl
234 235
 							.removeClass(layoutClasses.join(' '))

0 notes on commit 3f4aba5

Please sign in to comment.
Something went wrong with that request. Please try again.