Skip to content

Commit

Permalink
fix: Zero elevation data in GPX should still be included
Browse files Browse the repository at this point in the history
  • Loading branch information
Raruto authored May 30, 2023
1 parent f9cc53b commit 6457106
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -31011,6 +31011,7 @@ exports[`toGeoJSON > zero_elevation.gpx 1`] = `
[
-71.09622,
42.210031,
0,
],
[
-71.096284,
Expand Down
1 change: 1 addition & 0 deletions lib/kml/extractStyle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ describe("extractStyle", () => {
],
"icon-opacity": 1,
"icon-scale": 1,
"label-scale": 0,
}
`);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function num1(
) {
const val = parseFloat(nodeVal(get1(node, tagName)));
if (isNaN(val)) return undefined;
if (val && callback) callback(val);
if (callback) callback(val);
return val;
}

Expand Down

0 comments on commit 6457106

Please sign in to comment.