mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
Fix day start max hour
A 24 hour clock goes from 0 to 23. A friend of mine plays your game and referred me to your "dailies" bounty. This probably won't fix that issue, but I'll submit anyway. :)
This commit is contained in:
parent
b8cd762de2
commit
974a840016
1 changed files with 2 additions and 2 deletions
|
|
@ -233,7 +233,7 @@ var UserSchema = new Schema({
|
|||
},
|
||||
preferences: {
|
||||
armorSet: String,
|
||||
dayStart: {type:Number, 'default': 0, min: 0, max: 24},
|
||||
dayStart: {type:Number, 'default': 0, min: 0, max: 23},
|
||||
size: {type:String, enum: ['broad','slim'], 'default': 'broad'},
|
||||
hair: {
|
||||
color: {type: String, 'default': 'blond'},
|
||||
|
|
@ -354,7 +354,7 @@ UserSchema.pre('save', function(next) {
|
|||
}
|
||||
|
||||
//this.markModified('tasks');
|
||||
if (_.isNaN(this.preferences.dayStart) || this.preferences.dayStart < 0 || this.preferences.dayStart > 24) {
|
||||
if (_.isNaN(this.preferences.dayStart) || this.preferences.dayStart < 0 || this.preferences.dayStart > 23) {
|
||||
this.preferences.dayStart = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue