[CB-4187] Fix start-up stalling when no plugins are installed. (cherry picked from commit e74c3f136dae6d5f38ce3370a1927b58ab47a0fc)
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/192aff34 Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/192aff34 Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/192aff34 Branch: refs/heads/2.9.x Commit: 192aff34b23de6fde7c60628b037aa464a832c55 Parents: e13fbe7 Author: Andrew Grieve <[email protected]> Authored: Thu Jul 11 21:59:21 2013 -0400 Committer: Andrew Grieve <[email protected]> Committed: Tue Oct 22 11:36:30 2013 -0400 ---------------------------------------------------------------------- lib/common/pluginloader.js | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-js/blob/192aff34/lib/common/pluginloader.js ---------------------------------------------------------------------- diff --git a/lib/common/pluginloader.js b/lib/common/pluginloader.js index 002f944..5f61b39 100644 --- a/lib/common/pluginloader.js +++ b/lib/common/pluginloader.js @@ -79,6 +79,11 @@ function finishPluginLoading() { function handlePluginsObject(path, moduleList) { // Now inject the scripts. var scriptCounter = moduleList.length; + + if (!scriptCounter) { + onScriptLoadingComplete(); + return; + } function scriptLoadedCallback() { if (!--scriptCounter) { onScriptLoadingComplete(moduleList);
