Skip to content

Commit e5c2bb1

Browse files
Small fix for label selection box
1 parent 463189e commit e5c2bb1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/projects/projectId/labeling/sessionId/sub-components/LabelingSuiteLabeling.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,10 @@ export default function LabelingSuiteLabeling() {
517517

518518
function handleKeyboardEvent(event) {
519519
const labelSelection = document.getElementById('label-selection-box');
520-
if (!labelSelection) return;
521520
if (event.key == 'ArrowRight' || event.key == 'ArrowLeft') {
522521
setActiveTasksFunc([]);
523522
}
524-
if (!labelSelection.classList.contains('hidden')) return;
523+
if (labelSelection && !labelSelection.classList.contains('hidden')) return;
525524
for (const key in labelHotkeys) {
526525
if (key == event.key) {
527526
const task = labelingTasks.find(t => t.id == labelHotkeys[key].taskId);

0 commit comments

Comments
 (0)