Skip to content

Commit d6ba79e

Browse files
author
Pedro Lucas Da Silva Cunha
committed
Prevent error when scrolling through time before setting apm
1 parent 02e500e commit d6ba79e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@
405405
emitValue () {
406406
const tmpHour = this.hour ? this.hour : this.getAvailableHour()
407407
let hour = this.isTwelveFormat && (tmpHour === 24 || tmpHour === 12)
408-
? this.apm.toLowerCase() === 'am' ? 0 : 12
408+
? this.apm && this.apm.toLowerCase() === 'am' ? 0 : 12
409409
: tmpHour
410410
hour = (hour < 10 ? '0' : '') + hour
411411
const minute = this.minute ? (this.minute < 10 ? '0' : '') + this.minute : '00'

0 commit comments

Comments
 (0)