Skip to content

Commit 082a0b8

Browse files
refactor: remove overbearing local state cleanup
1 parent 0893231 commit 082a0b8

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

src/pages/iou/request/step/IOURequestStepDistanceOdometer.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,6 @@ function IOURequestStepDistanceOdometer({
225225
const hasTransactionData = (currentStart !== null && currentStart !== undefined) || (currentEnd !== null && currentEnd !== undefined);
226226
const hasLocalState = startReadingRef.current || endReadingRef.current;
227227

228-
// Clear local state when transaction data is cleared (e.g., after blob URL failure reset).
229-
if (!hasTransactionData && hasLocalState) {
230-
setStartReading('');
231-
setEndReading('');
232-
startReadingRef.current = '';
233-
endReadingRef.current = '';
234-
return;
235-
}
236-
237228
const shouldInitialize =
238229
(!hasInitializedRefs.current && hasTransactionData) ||
239230
(isEditing && hasTransactionData && !hasLocalState) ||

0 commit comments

Comments
 (0)