Skip to content

Commit 9beabff

Browse files
committed
fix: clear trackingState when cancelSubmitFollowUpActionSpan is called
1 parent d1e248e commit 9beabff

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/libs/telemetry/submitFollowUpAction.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ function endSubmitFollowUpActionSpan(followUpAction: SubmitFollowUpAction, repor
195195
function cancelSubmitFollowUpActionSpan() {
196196
cancelSpan(CONST.TELEMETRY.SPAN_SUBMIT_TO_DESTINATION_VISIBLE);
197197
clearPendingSubmitFollowUpAction();
198+
trackingState = null;
198199
}
199200

200201
// ---------------------------------------------------------------------------
@@ -270,11 +271,11 @@ function cancelTracking() {
270271
if (!trackingState) {
271272
return;
272273
}
274+
const {skipSubmitExpenseSpan} = trackingState;
273275
cancelSubmitFollowUpActionSpan();
274-
if (!trackingState.skipSubmitExpenseSpan) {
276+
if (!skipSubmitExpenseSpan) {
275277
cancelSpan(CONST.TELEMETRY.SPAN_SUBMIT_EXPENSE);
276278
}
277-
trackingState = null;
278279
}
279280

280281
/**

0 commit comments

Comments
 (0)