Skip to content

Commit d1f9644

Browse files
committed
fillValue truthiness
1 parent 6fc88eb commit d1f9644

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/zarr/GetArray.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export async function GetArray(varOveride?: string) {
8181
} else {
8282
const raw = await fetcher.fetchChunk({ variable:targetVariable, rank, shape, chunkShape, x, y, z, xDimIndex, yDimIndex, zDimIndex, idx4D });
8383

84-
const rawData = fillValue ? raw.data.map((v: number) => v === fillValue ? NaN : v) : raw.data; // Don't map if no fillvalue
84+
const rawData = Number.isFinite(fillValue) ? raw.data.map((v: number) => v === fillValue ? NaN : v) : raw.data; // Don't map if no fillvalue
8585

8686
let [chunkF16, newScalingFactor] = ToFloat16(rawData, scalingFactor);
8787
let thisShape = raw.shape;

0 commit comments

Comments
 (0)