agregar check de undefined
This commit is contained in:
parent
7e7f917750
commit
a3936c5fdc
|
@ -230,8 +230,10 @@ export class UsersService {
|
||||||
const houses = response['houses'];
|
const houses = response['houses'];
|
||||||
let num_house = "";
|
let num_house = "";
|
||||||
await houses.forEach(async house => {
|
await houses.forEach(async house => {
|
||||||
if (tenant_id == house.tenants.tenant_id) {
|
if (house['tenant_id'] !== undefined) {
|
||||||
num_house = house.number_house;
|
if (house['tenant_id'] === tenant_id) {
|
||||||
|
num_house = house['number_house'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return num_house;
|
return num_house;
|
||||||
|
|
Loading…
Reference in New Issue