Skip to content
Snippets Groups Projects
Commit 83b26741 authored by paflov's avatar paflov
Browse files
parent af7cd8b3
No related branches found
No related tags found
No related merge requests found
......@@ -60,14 +60,15 @@ export class UnitDeactivateGuard implements CanDeactivate<UnithostComponent> {
if (!this.tcs.currentMaxTimerTestletId) { // leaving unit is not in a timed block
return of(true);
}
if (!this.tcs.testMode.forceTimeRestrictions) {
return of(true);
}
if (newUnit && newUnit.maxTimerRequiringTestlet && // staying in the same timed block
(newUnit.maxTimerRequiringTestlet.id === this.tcs.currentMaxTimerTestletId)
) {
return of(true);
}
if (!this.tcs.testMode.forceTimeRestrictions) {
this.tcs.interruptMaxTimer();
return of(true);
}
const dialogCDRef = this.confirmDialog.open(ConfirmDialogComponent, {
width: '500px',
data: <ConfirmDialogData>{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment