Skip to content

Commit

Permalink
chore: apply review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored May 20, 2024
1 parent 4f37336 commit cffda89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions projects/kit/src/lib/plugins/time-segments-stepping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit cffda89

Please sign in to comment.