Skip to content

Commit a5b15ed

Browse files
committed
add resolve on catch
1 parent b43fedd commit a5b15ed

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

src/plugin-manager.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,18 @@ pm.initPlugins = function(plugins, ofPluginApi) {
8282
var promises = [],
8383
key;
8484

85-
// add each plugin to package.json
86-
for (key in plugins) {
87-
if (plugins.hasOwnProperty(key)) {
88-
promises.push(_initPlugin(key, ofPluginApi));
85+
return new Promise((resolve, reject) => {
86+
// add each plugin to package.json
87+
for (key in plugins) {
88+
if (plugins.hasOwnProperty(key)) {
89+
promises.push(_initPlugin(key, ofPluginApi));
90+
}
8991
}
90-
}
9192

92-
return Promise.all(promises);
93+
Promise.all(promises)
94+
.then(resolve)
95+
.catch(resolve);
96+
});
9397
};
9498

9599
/**

0 commit comments

Comments
 (0)