diff --git a/changelog.d/20240503_101921_boris_fixed_length_of_undefined.md b/changelog.d/20240503_101921_boris_fixed_length_of_undefined.md new file mode 100644 index 000000000000..39d41c007e95 --- /dev/null +++ b/changelog.d/20240503_101921_boris_fixed_length_of_undefined.md @@ -0,0 +1,4 @@ +### Fixed + +- Fixed exception 'Could not read property length of undefined' when copy/paste a skeleton point + () diff --git a/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx b/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx index d0e7c78247d0..a8c45ca203c2 100644 --- a/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx +++ b/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/objects-list.tsx @@ -408,7 +408,7 @@ class ObjectsListContainer extends React.PureComponent { }, SWITCH_PINNED: (event: KeyboardEvent | undefined) => { preventDefault(event); - const state = activatedState(); + const state = activatedState(true); if (state && !readonly) { state.pinned = !state.pinned; updateAnnotations([state]); @@ -456,7 +456,7 @@ class ObjectsListContainer extends React.PureComponent { }, TO_BACKGROUND: (event: KeyboardEvent | undefined) => { preventDefault(event); - const state = activatedState(); + const state = activatedState(true); if (state && !readonly && state.objectType !== ObjectType.TAG) { state.zOrder = minZLayer - 1; updateAnnotations([state]); @@ -464,14 +464,14 @@ class ObjectsListContainer extends React.PureComponent { }, TO_FOREGROUND: (event: KeyboardEvent | undefined) => { preventDefault(event); - const state = activatedState(); + const state = activatedState(true); if (state && !readonly && state.objectType !== ObjectType.TAG) { state.zOrder = maxZLayer + 1; updateAnnotations([state]); } }, COPY_SHAPE: () => { - const state = activatedState(); + const state = activatedState(true); if (state && !readonly) { copyShape(state); }