Commit 57505b8a authored by Tobias Steiner's avatar Tobias Steiner
Browse files

Add a promise.all

parent be99b428
Pipeline #3001 passed with stage
in 2 minutes and 38 seconds
......@@ -55,7 +55,7 @@ export class ResponseCollector {
if(this.config.indexOf(data.name) > -1){
// check if array
if(Array.isArray(data.data.links)) {
data.data.links = await data.data.links.map(async (d) => {
data.data.links = await Promise.all(data.data.links.map(async (d) => {
const a = {};
try {
const provider = await UrlResolver.getProvider(d, this.language);
......@@ -67,9 +67,9 @@ export class ResponseCollector {
a['unknown'] = d;
return a;
}
});
}));
}
console.log(data);
console.log('data', data);
if(Array.isArray(this.finalData.data[data.name])) {
this.finalData.data[data.name].push(data.data);
......@@ -77,7 +77,7 @@ export class ResponseCollector {
this.finalData.data[data.name] = data.data;
}
console.log(this.finalData);
console.log('finalData', this.finalData);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment