Skip to content

Commit

Permalink
fix(pb-authority-lookup, anton): avoid error if json.data.location ==…
Browse files Browse the repository at this point in the history
… null
  • Loading branch information
wolfgangmm committed May 16, 2024
1 parent 63091ab commit d06a34a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/authority/anton.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ export class Anton extends Registry {
switch (this._register) {
case 'place':
output.country = json.data.country;
output.location = json.data.location.coordinates;
if (json.data.location && json.data.location.coordinates) {
output.location = json.data.location.coordinates;
}
output.links = json.data.links.map((link) => link.url);
break;
case 'person':
Expand Down

0 comments on commit d06a34a

Please sign in to comment.