When I am trying to return an array from setup method and try to use it in VU method, I am getting the below error
TypeError: Object has no member 'forEach' in javascript
Please find below my code;
export function setup(){
var listOfResponseMapStubs = getResponseMapStub();
return listOfResponseMapStubs;
}
export default function (listOfResponseMapStubs) {
if(!listOfResponseMapStubs){
console.error("No data found for test");
return;
}
listOfResponseMapStubs.forEach(rowMapData => {
var rowData = mapToObj(rowMapData);
sleep(0.1) ;
});
Appreciate your help
question from:
https://stackoverflow.com/questions/65886583/getting-error-typeerror-object-has-no-member-foreach-in-javascript-while-retu 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…