Skip to content

Commit 7ee4c2a

Browse files
fix: console no longer throws error if apm is not (#268)
1 parent 9625b54 commit 7ee4c2a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/VueCtkDateTimePicker/_subs/PickersContainer/_subs/TimePicker.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@
288288
onScrollHours: debounce(function (scroll) {
289289
const value = this.getValue(scroll)
290290
const hour = this.isTwelveFormat
291-
? this.apm.toLowerCase() === 'am'
292-
? value + 1
293-
: (value + 1 + 12)
291+
? this.apm
292+
? this.apm.toLowerCase() === 'am'
293+
? value + 1
294+
: (value + 1 + 12)
295+
:value
294296
: value
295297
if (this.isHoursDisabled(hour)) return
296298
this.hour = hour === 24 && !this.isTwelveFormat ? 23 : hour

0 commit comments

Comments
 (0)