From 40fecf13ad850a01342106a58e0ffbbf597f3da3 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 29 Apr 2024 20:09:40 -0400 Subject: [PATCH] fix: Unneccessary API requests on deleted documents --- app/scenes/Document/components/DataLoader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scenes/Document/components/DataLoader.tsx b/app/scenes/Document/components/DataLoader.tsx index 33d8280e6..ace2b46b0 100644 --- a/app/scenes/Document/components/DataLoader.tsx +++ b/app/scenes/Document/components/DataLoader.tsx @@ -183,7 +183,7 @@ function DataLoader({ match, children }: Props) { // Prevents unauthorized request to load share information for the document // when viewing a public share link - if (can.read) { + if (can.read && !document.isDeleted) { if (team.getPreference(TeamPreference.Commenting)) { void comments.fetchPage({ documentId: document.id,