r98121 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98120‎ | r98121 | r98122 >
Date:10:22, 26 September 2011
Author:catrope
Status:ok
Tags:
Comment:
MoodBar: Check return value of $.cookie() for null too. Apparently null != '' in JavaScript, I thought those two would be loosely equal.
Modified paths:
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js
@@ -49,7 +49,7 @@
5050 changed = false;
5151 if ( $username.val() == '' ) {
5252 var cookieUsername = $.cookie( 'moodbar-feedback-username' );
53 - if ( cookieUsername != '' ) {
 53+ if ( cookieUsername != '' && cookieUsername !== null ) {
5454 $username.val( cookieUsername );
5555 changed = true;
5656 }

Status & tagging log