agregar check de undefined

This commit is contained in:
Eduardo Quiros 2022-08-21 07:23:30 -06:00
parent 7e7f917750
commit a3936c5fdc
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
1 changed files with 4 additions and 2 deletions

View File

@ -230,8 +230,10 @@ export class UsersService {
const houses = response['houses'];
let num_house = "";
await houses.forEach(async house => {
if (tenant_id == house.tenants.tenant_id) {
num_house = house.number_house;
if (house['tenant_id'] !== undefined) {
if (house['tenant_id'] === tenant_id) {
num_house = house['number_house'];
}
}
})
return num_house;