@@ -103,26 +103,21 @@ const TimesStopsInput = ({ allWaypoints, startTime, pathSteps }: TimesStopsInput
103
103
if ( ! updatedRows [ operation . fromRowIndex ] . isMarginValid ) {
104
104
newRows [ operation . fromRowIndex ] . isMarginValid = false ;
105
105
setRows ( newRows ) ;
106
- } else if (
107
- ! rows [ operation . fromRowIndex ] . isMarginValid &&
108
- updatedRows [ operation . fromRowIndex ] . isMarginValid
109
- ) {
110
- newRows [ operation . fromRowIndex ] . isMarginValid = true ;
111
- setRows ( newRows ) ;
112
- } else {
113
- const newVias = updatedRows
114
- . filter (
115
- ( row , index ) =>
116
- ! isEqual ( normalizeNullablesInRow ( row ) , normalizeNullablesInRow ( rows [ index ] ) )
117
- )
118
- . map ( ( { shortSlipDistance, onStopSignal, arrival, departure, ...row } ) => ( {
119
- ...row ,
120
- arrival : durationSinceStartTime ( startTime , arrival ) ,
121
- departure : durationSinceStartTime ( startTime , departure ) ,
122
- receptionSignal : onStopSignalToReceptionSignal ( onStopSignal , shortSlipDistance ) ,
123
- } ) ) ;
124
- dispatch ( upsertSeveralViasFromSuggestedOP ( newVias ) ) ;
106
+ return ;
125
107
}
108
+
109
+ const newVias = updatedRows
110
+ . filter (
111
+ ( row , index ) =>
112
+ ! isEqual ( normalizeNullablesInRow ( row ) , normalizeNullablesInRow ( rows [ index ] ) )
113
+ )
114
+ . map ( ( { shortSlipDistance, onStopSignal, arrival, departure, ...row } ) => ( {
115
+ ...row ,
116
+ arrival : durationSinceStartTime ( startTime , arrival ) ,
117
+ departure : durationSinceStartTime ( startTime , departure ) ,
118
+ receptionSignal : onStopSignalToReceptionSignal ( onStopSignal , shortSlipDistance ) ,
119
+ } ) ) ;
120
+ dispatch ( upsertSeveralViasFromSuggestedOP ( newVias ) ) ;
126
121
} ,
127
122
[ rows , startTime ]
128
123
) ;
0 commit comments