Skip to content

Commit

Permalink
Fix preparePlatformSpecificManifests to handle edge cases (fixes #476) (
Browse files Browse the repository at this point in the history
  • Loading branch information
zaygraveyard authored and adam-lynch committed Oct 19, 2017
1 parent aee26ca commit 1977136
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,10 @@ NwBuilder.prototype.preparePlatformSpecificManifests = function(){
}

var self = this;
var promises = [];

return new Promise(function(resolve, reject){
self._forEachPlatform(function (name, platform) {

self._forEachPlatform(function (name, platform) {
promises.push(new Promise(function(resolve, reject){
var overrides = self._appPkg.platformOverrides;
if (overrides[name] || overrides[name.substr(0, name.length-2)]) {

Expand All @@ -355,9 +355,13 @@ NwBuilder.prototype.preparePlatformSpecificManifests = function(){
platform.platformSpecificManifest = result;
resolve();
});
} else {
resolve();
}
});
})
}));
});

return Promise.all(promises);
};


Expand Down

0 comments on commit 1977136

Please sign in to comment.