Skip to content

Commit be53003

Browse files
committed
fix: don't keep multiple sections when multiPitch is deselected
1 parent cdacae3 commit be53003

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

components/gymRoutes/forms/GymRouteForm.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,14 @@ export default {
608608
}
609609
},
610610
611+
watch: {
612+
multiPitch (newVal) {
613+
if (!newVal && this.data.sections.length > 1) {
614+
this.data.sections.splice(1)
615+
}
616+
}
617+
},
618+
611619
mounted () {
612620
this.getGymLevels()
613621
this.multiPitch = this.data.sections.length > 1

0 commit comments

Comments
 (0)