r86008 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86007‎ | r86008 | r86009 >
Date:23:30, 13 April 2011
Author:tparscal
Status:ok
Tags:
Comment:
Added better error checking for load responses.
Modified paths:
  • /trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/modules/jquery.articleFeedback/jquery.articleFeedback.js
@@ -222,7 +222,9 @@
223223 'success': function( data ) {
224224 var context = this;
225225 if (
226 - !$.isArray( data.query.articlefeedback )
 226+ !( 'query' in data )
 227+ || !( 'articlefeedback' in data.query )
 228+ || !$.isArray( data.query.articlefeedback )
227229 || !data.query.articlefeedback.length
228230 ) {
229231 mw.log( 'ArticleFeedback invalid response error.' );

Status & tagging log