Commit e16c37af authored by tobinski's avatar tobinski
Browse files

Remove duplicates form a result set. In case of circular references this may happen

parent 0f07d656
Pipeline #4665 passed with stages
in 2 minutes and 8 seconds
......@@ -47,9 +47,11 @@ export class ResponseCollector {
if(this.config.indexOf(data.name) > -1){
if(Array.isArray(this.finalData.data[data.name])) {
// perhaps wrong
this.finalData.data[data.name].push(data.data);
// remove duplicates
this.finalData.data[data.name] = [...new Set([...this.finalData.data[data.name],...data.data])];
} else {
this.finalData.data[data.name] = data.data;
// remove duplicates. This can happen in situation of circular references
this.finalData.data[data.name] = [...new Set(data.data)];
}
}
}
......
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