* (bug 29107) Fix regression in ResourceLoader debug mode for WikiEditor
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 24 May 2011 00:42:42 +0000 (00:42 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 24 May 2011 00:42:42 +0000 (00:42 +0000)
commit2f3cd252a5ff11af949b5b4acbdd74c64e95bf82
tree36d688e586398510d300c2ffb9ce0d7d0287df63
parenta07c4676df94fcba78b83d9e9b694abed2575e08
* (bug 29107) Fix regression in ResourceLoader debug mode for WikiEditor

One of WikiEditor's modules had only messages, no scripts; updates to the debug mode loader had ended up failing in the case where no scripts got passed in (if passed with a loader function we were fine, hence non-debug mode being ok)
This commit explicitly checks for the empty-array case and marks the module as ready immediately, instead of waiting for the last item in the loop to finish, which never happens. :)

Also consolidated three calls to the same few lines of code into a lambda function.
resources/mediawiki/mediawiki.js