mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix tsdoc endAt error (#1060)
This commit is contained in:
1 parent
f06aa69862
commit
8f2c5a17cd
1 file changed
+2
-1
@@ -94,7 +94,8 @@ export class ContestDetailBaseHandler extends Handler {
|
||||
}
|
||||
}
|
||||
if (this.tdoc.duration && this.tsdoc?.startAt) {
|
||||
this.tsdoc.endAt = moment(this.tsdoc.startAt).add(this.tdoc.duration, 'hours').toDate();
|
||||
const endAt = moment(this.tsdoc.startAt).add(this.tdoc.duration, 'hours').toDate();
|
||||
this.tsdoc.endAt = endAt < this.tdoc.endAt ? endAt : this.tdoc.endAt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user