fix: Unneccessary API requests on deleted documents
This commit is contained in:
@@ -183,7 +183,7 @@ function DataLoader({ match, children }: Props) {
|
|||||||
|
|
||||||
// Prevents unauthorized request to load share information for the document
|
// Prevents unauthorized request to load share information for the document
|
||||||
// when viewing a public share link
|
// when viewing a public share link
|
||||||
if (can.read) {
|
if (can.read && !document.isDeleted) {
|
||||||
if (team.getPreference(TeamPreference.Commenting)) {
|
if (team.getPreference(TeamPreference.Commenting)) {
|
||||||
void comments.fetchPage({
|
void comments.fetchPage({
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user