Fixes regression in r88125 - if batch is empty we should bail early
authorTrevor Parscal <tparscal@users.mediawiki.org>
Sun, 15 May 2011 09:10:04 +0000 (09:10 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Sun, 15 May 2011 09:10:04 +0000 (09:10 +0000)
resources/mediawiki/mediawiki.js

index 19cfc4f..7474a47 100644 (file)
@@ -984,6 +984,10 @@ window.mediaWiki = new ( function( $ ) {
                                        }
                                }
                        }
+                       // Early exit if there's nothing to load
+                       if ( !batch.length ) {
+                               return;
+                       }
                        // Clean up the queue
                        queue = [];
                        // Always order modules alphabetically to help reduce cache