Skip to content

Commit d6c24bd

Browse files
Don't fetch mesh files for segmentation layers without fallback layers (#8726)
The fetching of the meshes was not guarded against segmentation layer without a fallback. Only segmentation layer with fallback can have meshes. ### URL of deployed dev instance (used for testing): - https://___.webknossos.xyz ### Steps to test: - On master: Create a skeleton only annotaiton - add a empty volume layer without fallback - open segmentation tab -> watch it crash - On this branch: Do the same - No crash ### Issues: - fixes report https://scm.slack.com/archives/C02H5T8Q08P/p1751282276200889 ------ (Please delete unneeded items, merge only when none are left open) - [x] Added changelog entry (create a `$PR_NUMBER.md` file in `unreleased_changes` or use `./tools/create-changelog-entry.py`)
1 parent 14f5b9b commit d6c24bd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

frontend/javascripts/viewer/model/sagas/meshes/precomputed_mesh_saga.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ let fetchDeferredsPerLayer: Record<string, Deferred<Array<APIMeshFileInfo>, unkn
5858
function* maybeFetchMeshFiles(action: MaybeFetchMeshFilesAction): Saga<void> {
5959
const { segmentationLayer, dataset, mustRequest, autoActivate, callback } = action;
6060

61-
if (!segmentationLayer) {
61+
// Only an segmentation layer with an existing fallback layer can have meshfiles.
62+
if (
63+
!segmentationLayer ||
64+
!("fallbackLayer" in segmentationLayer) ||
65+
segmentationLayer.fallbackLayer == null
66+
) {
6267
callback([]);
6368
return;
6469
}

unreleased_changes/8726.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Fixed
2+
- Fixed a bug when loading mesh files for segmentation layer without fallback data. Such layer cannot have mesh files.

0 commit comments

Comments
 (0)