Skip to content

Commit 7f8b9c4

Browse files
committed
fix: guard reportIDFromRoute before clearing stale DM recovery target
1 parent 77697b9 commit 7f8b9c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pages/inbox/ReportFetchHandler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function ReportFetchHandler() {
277277
}, [isFocused, prevIsFocused]);
278278

279279
useEffect(() => {
280-
if (!isValidReportIDFromPath(reportIDFromRoute)) {
280+
if (!reportIDFromRoute || !isValidReportIDFromPath(reportIDFromRoute)) {
281281
return;
282282
}
283283
// Ensures the optimistic report is created successfully

0 commit comments

Comments
 (0)