From cffda89570e50e02956de1d483776a101d86eeae Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Mon, 20 May 2024 11:23:12 +0300 Subject: [PATCH] chore: apply review suggestion --- projects/kit/src/lib/plugins/time-segments-stepping.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/kit/src/lib/plugins/time-segments-stepping.ts b/projects/kit/src/lib/plugins/time-segments-stepping.ts index 9f7c8cf6e..85ed6f422 100644 --- a/projects/kit/src/lib/plugins/time-segments-stepping.ts +++ b/projects/kit/src/lib/plugins/time-segments-stepping.ts @@ -26,20 +26,20 @@ export function createTimeSegmentsSteppingPlugin({ event.preventDefault(); const selectionStart = element.selectionStart || 0; - const selectedSegment = getActiveSegment({ + const activeSegment = getActiveSegment({ segmentsIndexes, selectionStart, }); - if (!selectedSegment) { + if (!activeSegment) { return; } const updatedValue = updateSegmentValue({ - selection: segmentsIndexes.get(selectedSegment)!, + selection: segmentsIndexes.get(activeSegment)!, value: element.value, toAdd: event.key === 'ArrowUp' ? step : -step, - max: timeSegmentMaxValues[selectedSegment], + max: timeSegmentMaxValues[activeSegment], }); maskitoUpdateElement(element, {