fix: Unneccessary API requests on deleted documents

This commit is contained in:
Tom Moor
2024-04-29 20:09:40 -04:00
parent 14c6251be4
commit 40fecf13ad

View File

@@ -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,