Skip to content

Commit

Permalink
remove html tags (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak authored Aug 17, 2021
1 parent d48ba12 commit 1436520
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { getArea } from "ol/sphere";
/**
* Calculate & format the area of a polygon
* @param polygon
* @param units - defaults to square metres, or supports "ha" for hectares
* @returns - a string with html tags
* @param units - defaults to square metres ("m2"), or supports "ha" for hectares
* @returns - a string
*/
export function formatArea(polygon: Geometry, units: String = "m2") {
const area = getArea(polygon);
Expand All @@ -15,7 +15,7 @@ export function formatArea(polygon: Geometry, units: String = "m2") {

let output;
if (units === "m2") {
output = squareMetres + " m<sup>2</sup>";
output = squareMetres + " m²";
} else if (units === "ha") {
output = hectares + " ha";
}
Expand Down

0 comments on commit 1436520

Please sign in to comment.