Skip to content

Commit

Permalink
use Object.values
Browse files Browse the repository at this point in the history
  • Loading branch information
campersau committed May 7, 2020
1 parent 2ce517b commit a7b0989
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ if (config.authentication) {
const indexHtmlCacheKey = cache.registerFunc(() => {
return cache.resolveFunc(pluginsCacheKey).then((plugins) => {
return fs.readFile(__dirname + '/../public/index.html').then((data) => {
return Promise.all(Object.keys(plugins).map((pluginName) => {
return plugins[pluginName].compile();
return Promise.all(Object.values(plugins).map((plugin) => {
return plugin.compile();
})).then((results) => {
data = data.toString().replace('<!-- ungit-plugins-placeholder -->', results.join('\n\n'));
data = data.replace(/__ROOT_PATH__/g, config.rootPath);
Expand Down

0 comments on commit a7b0989

Please sign in to comment.