mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
fix custom day start, @lefnire we may have to restore old values or make a bailey announcement about this, also client-side the validation prevents deleting the old value, it only allows to use the increase/decrease button or selecting the old value and replacing it
This commit is contained in:
@@ -258,8 +258,7 @@ UserSchema.virtual('tasks').get(function () {
|
|||||||
|
|
||||||
UserSchema.pre('save', function(next) {
|
UserSchema.pre('save', function(next) {
|
||||||
//this.markModified('tasks');
|
//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 > 0) {
|
|
||||||
this.preferences.dayStart = 0;
|
this.preferences.dayStart = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user