Skip to content

Commit 80133ab

Browse files
committed
fix prefetch infinite loop
1 parent ca8486f commit 80133ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/loaders/OmeZarrLoader.ts

+4
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ class OMEZarrLoader extends ThreadableVolumeLoader {
454454
/** Reads a list of chunk keys requested by a `loadVolumeData` call and sets up appropriate prefetch requests. */
455455
private beginPrefetch(keys: ZarrChunkFetchInfo[], scaleLevel: number): void {
456456
// Convert keys to arrays of coords
457+
if (keys.length === 0) {
458+
return;
459+
}
460+
457461
const chunkCoords = keys.map(({ sourceIdx, key }) => {
458462
const numDims = getDimensionCount(this.sources[sourceIdx].axesTCZYX);
459463
const coordsInDimensionOrder = key

0 commit comments

Comments
 (0)