Skip to content

Commit

Permalink
improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed May 16, 2023
1 parent 4a84776 commit 975d63c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/dvbjs/src/coords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ export function coords(
};

return axios(options).then((response) => {
if (response.data) {
if (response.data && response.data.split("|").length === 2) {
const coordinates = response.data.split("|");

if (coordinates.length > 1) {
return utils.WmOrGK4toWGS84(coordinates[1], coordinates[0]);
}
return utils.WmOrGK4toWGS84(coordinates[1], coordinates[0]);
}

return undefined;
Expand Down

0 comments on commit 975d63c

Please sign in to comment.