I pushed some third party code to our Repo and got this errormessage from Sonar Cloud; "Add a "return" statement to this callback."
I added the return statement, but still got the same error.
I also tried to replace the comma after the forEach function with a semicolon.
THIS IS THE BEGINNING CODE:
o.map(function (n) {
t.setPercentBar(n, e);
});
THIS IS WHAT I DID:
o.map(function (n) {
return t.setPercentBar(n, e);
});
This is the function where the map function is inside:
fillPercentBar: function (e) {
var t = this,
n = r(".progress-action"),
o = [];
Object.values(n).forEach(function (e) {
o.push(e.id);
}),
o.map(function (n) {
t.setPercentBar(n, e);
});
},