mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-23 00:19:58 +08:00
fix(send-later): Override moment's __proto__ - oclock wasn't "sticking"?
This commit is contained in:
parent
0c8ecc5829
commit
54039db56e
1 changed files with 3 additions and 3 deletions
|
@ -12,15 +12,15 @@ const Days = {
|
|||
ThisWeekend: 6,
|
||||
}
|
||||
|
||||
moment.prototype.oclock = function oclock() {
|
||||
moment().__proto__.oclock = function oclock() {
|
||||
return this.minute(0).second(0)
|
||||
}
|
||||
|
||||
moment.prototype.morning = function morning(morningHour = Hours.Morning) {
|
||||
moment().__proto__.morning = function morning(morningHour = Hours.Morning) {
|
||||
return this.hour(morningHour).oclock()
|
||||
}
|
||||
|
||||
moment.prototype.evening = function evening(eveningHour = Hours.Evening) {
|
||||
moment().__proto__.evening = function evening(eveningHour = Hours.Evening) {
|
||||
return this.hour(eveningHour).oclock()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue