Permalink
Browse files

BZ807436: Fix login error message on IE8

https://bugzilla.redhat.com/show_bug.cgi?id=807436

The issue was caused by the jQuery.isEmptyObject() call. As the documentation states it should not be used with strings.
http://api.jquery.com/jQuery.isEmptyObject/
  • Loading branch information...
1 parent 297af0a commit 9013bc2fc2a341ec080b2e20e3fbbdc04fbc9f52 @ifarkas ifarkas committed Mar 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/views/user_sessions/new.html.haml
View
2 src/app/views/user_sessions/new.html.haml
@@ -34,7 +34,7 @@
//we will have to check if status code == 0 in 'complete' callback
$('#error-content').remove();
$('#primary-container').prepend('<div id="error-content" class="error" style="opacity: 0; position: relative;"></div>');
- var text = $.isEmptyObject(response.responseText) ? response.statusText : response.responseText;
+ var text = response.responseText == '' ? response.statusText : response.responseText;
if(response.status !== 401) text = "Internal Server Error";
$('#error-content').html('<p class="text">' + text + '</p>');
$('#error-content').animate({ 'opacity': 1, 'top': -10 },{queue:false,duration:150});

0 comments on commit 9013bc2

Please sign in to comment.