mirror of
https://github.com/outline/outline.git
synced 2026-01-06 02:59:54 -06:00
Skip auxiliary data load when viewing revisions (#8460)
This commit is contained in:
@@ -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 && !document.isDeleted) {
|
||||
if (can.read && !document.isDeleted && !revisionId) {
|
||||
if (team.getPreference(TeamPreference.Commenting)) {
|
||||
void comments.fetchAll({
|
||||
documentId: document.id,
|
||||
@@ -199,7 +199,17 @@ function DataLoader({ match, children }: Props) {
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [can.read, can.update, document, isEditRoute, comments, team, shares, ui]);
|
||||
}, [
|
||||
can.read,
|
||||
can.update,
|
||||
document,
|
||||
isEditRoute,
|
||||
comments,
|
||||
team,
|
||||
shares,
|
||||
ui,
|
||||
revisionId,
|
||||
]);
|
||||
|
||||
if (error) {
|
||||
return error instanceof OfflineError ? (
|
||||
|
||||
Reference in New Issue
Block a user