Skip to content

Commit

Permalink
chore: fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Sep 27, 2024
1 parent 755375e commit 003e5bc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions projects/kit/src/lib/plugins/time/meridiem-stepping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ export function createMeridiemSteppingPlugin(meridiemStartIndex: number): Maskit

event.preventDefault();

/* eslint-disable no-nested-ternary */
// eslint-disable-next-line no-nested-ternary
const meridiemMainCharacter = value.includes('A')
? 'P'
: value.includes('P')
: value.includes('P') || event.key === 'ArrowUp'
? 'A'
: event.key === 'ArrowDown'
? 'P'
: 'A';
: 'P';

const newMeridiem = `${CHAR_NO_BREAK_SPACE}${meridiemMainCharacter}M`;

maskitoUpdateElement(element, {
Expand Down

0 comments on commit 003e5bc

Please sign in to comment.