Skip to content

Commit

Permalink
fix: Merge pull request #278 from PaulCapron/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbieh authored Oct 11, 2021
2 parents d0377d2 + f8657f0 commit 3827a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sexagesimalToDecimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { sexagesimalPattern } from './constants';

// Converts a sexagesimal coordinate to decimal format
const sexagesimalToDecimal = (sexagesimal: any) => {
const data = new RegExp(sexagesimalPattern).exec(sexagesimal);
const data = new RegExp(sexagesimalPattern).exec(sexagesimal.toString().trim());

if (typeof data === 'undefined' || data === null) {
throw new Error('Given value is not in sexagesimal format');
Expand Down

0 comments on commit 3827a8f

Please sign in to comment.