Skip to content

Commit

Permalink
municipalities optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
DovMa committed May 17, 2024
1 parent b7cfd13 commit f9a06f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/locations.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ export default class LocationsService extends moleculer.Service {
});
const { features } = await data.json();
return {
id: Number(features[0].properties.kodas),
name: features[0].properties.pavadinimas,
id: Number(features[0]?.properties?.kodas),
name: features[0]?.properties?.pavadinimas,
};
}
}

0 comments on commit f9a06f6

Please sign in to comment.