File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ import {
3333 isMoneyRequestAction ,
3434} from '@libs/ReportActionsUtils' ;
3535import { isValidReportIDFromPath } from '@libs/ReportUtils' ;
36+ import { cancelSpansByPrefix } from '@libs/telemetry/activeSpans' ;
3637import { isDefaultAvatar , isLetterAvatar , isPresetAvatar } from '@libs/UserAvatarUtils' ;
3738import Navigation from '@navigation/Navigation' ;
3839import ReactionListWrapper from '@pages/inbox/ReactionListWrapper' ;
@@ -194,6 +195,11 @@ function SearchMoneyRequestReportPage({route}: SearchMoneyRequestPageProps) {
194195
195196 useEffect ( ( ) => {
196197 hasCreatedLegacyThreadRef . current = false ;
198+
199+ return ( ) => {
200+ // Cancel any pending send-message spans to prevent orphaned spans when navigating away
201+ cancelSpansByPrefix ( CONST . TELEMETRY . SPAN_SEND_MESSAGE ) ;
202+ } ;
197203 } , [ reportIDFromRoute ] ) ;
198204
199205 // Create transaction thread for legacy transactions that don't have one yet.
You can’t perform that action at this time.
0 commit comments