Skip to content

Commit 55c1df9

Browse files
jggoebelpprinzSVA
andauthored
remove unnecessary boolean checks (hobbyfarm#225)
Co-authored-by: Philip Prinz <[email protected]>
1 parent 1d3f16a commit 55c1df9

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/app/course/course-form/course-form.component.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,13 @@ export class CourseFormComponent implements OnInit, OnChanges {
8181
pause_duration: pauseDuration,
8282
});
8383
}
84+
this.courseDetails.patchValue({
85+
pauseable: this.course.pauseable,
86+
});
8487

85-
if (this.course.pauseable) {
86-
this.courseDetails.patchValue({
87-
pauseable: this.course.pauseable,
88-
});
89-
}
90-
91-
if (this.course.keep_vm) {
92-
this.courseDetails.patchValue({
93-
keep_vm: this.course.keep_vm,
94-
});
95-
}
88+
this.courseDetails.patchValue({
89+
keep_vm: this.course.keep_vm,
90+
});
9691

9792
if (this.course.keepalive_duration) {
9893
this.courseDetails.patchValue({

0 commit comments

Comments
 (0)