r95857 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95856‎ | r95857 | r95858 >
Date:12:22, 31 August 2011
Author:dantman
Status:ok
Tags:
Comment:
Add an extra cookie_font truthy guard just in case config[0] is empty
Modified paths:
  • /trunk/extensions/WebFonts/js/webfonts.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/js/webfonts.js
@@ -160,7 +160,7 @@
161161 $.webfonts.buildMenu(config);
162162 //see if there is a font in cookie
163163 var cookie_font = $.cookie('webfonts-font') || config[0];
164 - if (cookie_font !== 'none') {
 164+ if (cookie_font && cookie_font !== 'none') {
165165 $.webfonts.set(cookie_font);
166166 //mark it as checked
167167 $('#webfont-'+cookie_font).attr('checked', 'checked');

Status & tagging log