Skip to content

Commit 77c2e32

Browse files
committed
Ignore empty sized color palettes
1 parent c547507 commit 77c2e32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ome.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ function parseOmeroMeta({ rdefs, channels, name }: Ome.Omero, axes: Ome.Axis[]):
361361
}
362362

363363
function resolveImageLabelsLut(attrs: Ome.ImageLabel): LabelLayerLut | undefined {
364-
if (!attrs.colors) return undefined;
364+
if (!attrs.colors || attrs.colors.length === 0) {
365+
return undefined;
366+
}
365367
return Object.fromEntries(attrs.colors.map((d) => [d["label-value"], d.rgba]));
366368
}

0 commit comments

Comments
 (0)