Skip to content

Commit

Permalink
Prettier code
Browse files Browse the repository at this point in the history
  • Loading branch information
mducle committed Nov 19, 2024
1 parent 4715184 commit e9d9a47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/components/Block.tsx
Original file line number Diff line number Diff line change
@@ -6,14 +6,14 @@ const grafana_stub =
"https://shadow.nd.rl.ac.uk/grafana/d/wMlwwaHMk/block-history?viewPanel=2&orgId=1&var-block=";

function numberFormatter(value: string | number | undefined) {
var nValue: number = value == undefined ? NaN : +value
var nValue: number = value == undefined ? NaN : +value;
if (isNaN(nValue)) {
return value
return value;
} else {
if (nValue != 0 && (Math.abs(nValue) < 0.001 || Math.abs(nValue) > 10000)) {
return nValue.toExponential()
return nValue.toExponential();
} else {
return nValue.toPrecision()
return nValue.toPrecision();
}
}
}

0 comments on commit e9d9a47

Please sign in to comment.