Skip to content

Commit

Permalink
feat(composables): Area of useMeasure now show nothing when area va…
Browse files Browse the repository at this point in the history
…lue is 0.
  • Loading branch information
s3xysteak committed May 4, 2024
1 parent 594ae70 commit 80eb4a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/composables/useMeasure/src/area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function area(options: AreaOptions = {}): AreaReturn {
endEntityProps = {},
closeEntityProps = {},
centerEntityProps = {},
format = area => `Area: ${(area / 1000_000).toFixed(2)} km²`,
format = area => area ? `Area: ${(area / 1000_000).toFixed(2)} km²` : '',
} = options

const state = ref(false)
Expand Down

0 comments on commit 80eb4a1

Please sign in to comment.