Skip to content

Commit d3dd2a8

Browse files
Fix adding new layer via advanced dataset settings tab (#8550)
* fix adding new layer via advanced dataset settings tab * add changelog entry --------- Co-authored-by: Florian M <fm3@users.noreply.github.com>
1 parent 77973eb commit d3dd2a8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.unreleased.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
3232
- Fixed the alignment of the button that allows restricting floodfill operations to a bounding box. [#8388](https://github.com/scalableminds/webknossos/pull/8388)
3333
- Fixed that it was possible to trigger the find largest segment id job on layers which are not stored as segmentation layers on the server. [#8503](https://github.com/scalableminds/webknossos/pull/8503)
3434
- Fixed resolution of legacy links having dataset names with `-`. [#8548](https://github.com/scalableminds/webknossos/pull/8548)
35+
- Fixed that adding a layer using the dataset settings' advanced tab would crash WEBKNOSSOS. Bug was introduced by [#8503](https://github.com/scalableminds/webknossos/pull/8503). [#8550](https://github.com/scalableminds/webknossos/pull/8550)
3536
- Fixed a rare and subtle bug related to volume annotation and undo/redo. [#7506](https://github.com/scalableminds/webknossos/pull/7506)
3637
- Fixed a bug where segment statistics would sometimes be wrong in case of an on-disk segmentation fallback layer with segment index file. [#8460](https://github.com/scalableminds/webknossos/pull/8460)
3738
- Fixed a bug where sometimes outdated segment statistics would be displayed. [#8460](https://github.com/scalableminds/webknossos/pull/8460)

frontend/javascripts/dashboard/dataset/dataset_settings_data_tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ function SimpleLayerForm({
359359
form: FormInstance;
360360
dataset: APIDataset | null | undefined;
361361
}) {
362-
const layerCategorySavedOnServer = dataset?.dataSource.dataLayers[index].category;
362+
const layerCategorySavedOnServer = dataset?.dataSource.dataLayers[index]?.category;
363363
const isStoredAsSegmentationLayer = layerCategorySavedOnServer === "segmentation";
364364
const dataLayers = Form.useWatch(["dataSource", "dataLayers"]);
365365
const category = Form.useWatch(["dataSource", "dataLayers", index, "category"]);

0 commit comments

Comments
 (0)