Skip to content

Commit

Permalink
Prevent error when scrolling through time before setting apm
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Lucas Da Silva Cunha committed Jul 30, 2020
1 parent 02e500e commit d6ba79e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
emitValue () {
const tmpHour = this.hour ? this.hour : this.getAvailableHour()
let hour = this.isTwelveFormat && (tmpHour === 24 || tmpHour === 12)
? this.apm.toLowerCase() === 'am' ? 0 : 12
? this.apm && this.apm.toLowerCase() === 'am' ? 0 : 12
: tmpHour
hour = (hour < 10 ? '0' : '') + hour
const minute = this.minute ? (this.minute < 10 ? '0' : '') + this.minute : '00'
Expand Down

0 comments on commit d6ba79e

Please sign in to comment.