I have this code, but i get an error on this code underlined 'startups[i].logo' is possible undefined, why this error if I use if to check the values ?
for (let i = 0; i < startups.length; i++) {
let startup = startups[i];
if (startups[i] && startups[i].logo && startups[i].logo.location) {
aStartup.push({
objectID: startups[i].id,
logo: startups[i].logo.location,
});
batchCount ++;
}