Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -611,11 +611,12 @@ |
612 | 612 | filter( 'ready', jobs[j].dependencies ), |
613 | 613 | jobs[j].dependencies ) ) |
614 | 614 | { |
615 | | - if ( $.isFunction( jobs[j].ready ) ) { |
616 | | - jobs[j].ready(); |
617 | | - } |
| 615 | + var callback = jobs[j].ready; |
618 | 616 | jobs.splice( j, 1 ); |
619 | 617 | j -= 1; |
| 618 | + if ( $.isFunction( callback ) ) { |
| 619 | + callback(); |
| 620 | + } |
620 | 621 | } |
621 | 622 | } |
622 | 623 | // Execute modules whose dependencies have just been met |