Skip to content

Commit

Permalink
debug client: simplify location parser coordinate format
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkoszegi committed Nov 21, 2024
1 parent 7f267f7 commit bc1bca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/util/locationConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Location } from '../gql/graphql.ts';

const DOUBLE_PATTERN = '-{0,1}\\d+(\\.\\d+){0,1}';

const LAT_LON_PATTERN = '(' + DOUBLE_PATTERN + ')(\\s*,\\s*|\\s+)(' + DOUBLE_PATTERN + ')';
const LAT_LON_PATTERN = '(' + DOUBLE_PATTERN + ')(\\s+)(' + DOUBLE_PATTERN + ')';

export function parseLocation(value: string): Location | null {
const latLonMatch = value.match(LAT_LON_PATTERN);
Expand Down

0 comments on commit bc1bca0

Please sign in to comment.