r108614 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108613‎ | r108614 | r108615 >
Date:14:07, 11 January 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Fix Uncaught TypeError: Cannot read property 'ttf' of undefined
Modified paths:
  • /trunk/extensions/WebFonts/resources/ext.webfonts.preview.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/resources/ext.webfonts.preview.js
@@ -6,6 +6,10 @@
77
88 var showPreview = function () {
99 var font = $( 'select#webfonts-font-chooser' ).val();
 10+ if ( font === null ) {
 11+ return true;
 12+ }
 13+
1014 var $downloadLink = $( 'a#webfonts-preview-download' );
1115 var $previewBox = $( 'div#webfonts-preview-area' );
1216 mw.webfonts.addFont( font );

Status & tagging log