Skip to content

Commit af573ef

Browse files
committed
fix beam current PVs being NaN as string
1 parent de4bb5e commit af573ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/components/TargetStation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function TargetStation({
88
}: {
99
name: string;
1010
instruments: Array<instListEntryWithRunstatePVandValue>;
11-
beamCurrent: number | null | undefined;
11+
beamCurrent: number| string | null | undefined;
1212
}) {
1313
instruments = instruments.sort((instrumenta, instrumentb) =>
1414
instrumenta.name.localeCompare(instrumentb.name),
@@ -17,7 +17,7 @@ export default function TargetStation({
1717
<div className="flex flex-col justify-center items-start w-full">
1818
<h1 className="w-full text-left text-gray-600 dark:text-gray-200 font-semibold text-md mt-2 py-2 ">
1919
{name}{" "}
20-
{beamCurrent !== undefined && beamCurrent !== null
20+
{beamCurrent !== undefined && beamCurrent !== null && typeof beamCurrent !== 'string'
2121
? "- " + beamCurrent.toFixed(2) + " μA"
2222
: ""}
2323
</h1>

0 commit comments

Comments
 (0)