diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx index da293251..ef962c54 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/canvas-wrapper.tsx @@ -571,7 +571,7 @@ export default class CanvasWrapperComponent extends React.PureComponent { canvasInstance.fit(); } } - if (activatedState.objectType !== ObjectType.TAG) { + if (activatedState && activatedState.objectType !== ObjectType.TAG) { canvasInstance.activate(activatedStateID, activatedAttributeID); } const el = window.document.getElementById(`cvat_canvas_shape_${activatedStateID}`);