We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8954cf0 commit c1851faCopy full SHA for c1851fa
packages/xpath/src/lib/geo/Geotrace.ts
@@ -39,9 +39,12 @@ const collectLines = (geopoints: GeotracePoints): readonly GeotraceLine[] => {
39
40
export class Geotrace {
41
static fromEncodedGeotrace(encoded: string): Geotrace {
42
- const geopoints = encoded.split(/\s*;\s*/).map((value) => {
43
- return Geopoint.fromNodeValue(value);
44
- });
+ const geopoints = encoded
+ .replace(/\s*;\s*$/, '')
+ .split(/\s*;\s*/)
45
+ .map((value) => {
46
+ return Geopoint.fromNodeValue(value);
47
+ });
48
49
return this.fromGeopoints(geopoints);
50
}
0 commit comments