You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/05/29 04:34:54 UTC

[3/6] git commit: Small tweak to promises style in AppsService

Small tweak to promises style in AppsService


Project: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/commit/098cc0a2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/tree/098cc0a2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-app-harness/diff/098cc0a2

Branch: refs/heads/master
Commit: 098cc0a26f0c1945607bc3fed78d0b2e3ac8bac7
Parents: 5eaa8cb
Author: Andrew Grieve <ag...@chromium.org>
Authored: Wed May 28 20:51:49 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed May 28 20:51:49 2014 -0400

----------------------------------------------------------------------
 www/cdvah/js/AppsService.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-app-harness/blob/098cc0a2/www/cdvah/js/AppsService.js
----------------------------------------------------------------------
diff --git a/www/cdvah/js/AppsService.js b/www/cdvah/js/AppsService.js
index 0d3f2e5..43adc0c 100644
--- a/www/cdvah/js/AppsService.js
+++ b/www/cdvah/js/AppsService.js
@@ -53,7 +53,8 @@
                 var appList = json['appList'] || [];
                 _installers = [];
                 var i = -1;
-                function next() {
+                return $q.when()
+                .then(function next() {
                     var entry = appList[++i];
                     if (!entry) {
                         return;
@@ -64,8 +65,7 @@
                         _installers.push(app);
                         return next();
                     }, next);
-                }
-                return next();
+                });
             });
         }