fix: prevent history from crashing due to missing EditorView (#3257)

* put the editor into read only mode when examining history
This commit is contained in:
Nan Yu
2022-03-16 15:01:25 -07:00
committed by GitHub
parent d1b28499c6
commit ac2a124714
2 changed files with 7 additions and 3 deletions

View File

@@ -272,7 +272,11 @@ class DataLoader extends React.Component<Props> {
revision,
abilities,
isEditing: this.isEditing,
readOnly: !this.isEditing || !abilities.update || document.isArchived,
readOnly:
!this.isEditing ||
!abilities.update ||
document.isArchived ||
!!revisionId,
onSearchLink: this.onSearchLink,
onCreateLink: this.onCreateLink,
sharedTree: this.sharedTree,