mirror of
https://github.com/outline/outline.git
synced 2026-11-27 07:58:51 +03:00
fix: Use static docs for archived,trash,revisions
This commit is contained in:
1 parent
4973298f24
commit
80ff682ec6
3 files changed
+10
-1
No files matched your search
@@ -14,6 +14,7 @@
|
||||
.*/node_modules/yjs/.*
|
||||
.*/node_modules/y-prosemirror/.*
|
||||
.*/node_modules/y-protocols/.*
|
||||
.*/node_modules/y-indexeddb/.*
|
||||
.*/node_modules/lib0/.*
|
||||
.*/server/scripts/.*
|
||||
*.test.js
|
||||
|
||||
@@ -248,6 +248,8 @@ class DataLoader extends React.Component<Props> {
|
||||
|
||||
const abilities = policies.abilities(document.id);
|
||||
|
||||
// We do not want to remount the document when changing from view->edit
|
||||
// on the multiplayer flag as the doc is guaranteed to be upto date.
|
||||
const key = team.features.multiplayerEditor
|
||||
? ""
|
||||
: this.isEditing
|
||||
|
||||
@@ -363,6 +363,12 @@ class DocumentScene extends React.Component<Props> {
|
||||
: [];
|
||||
const showContents = ui.tocVisible && readOnly;
|
||||
|
||||
const multiplayerEditor =
|
||||
team?.features?.multiplayerEditor &&
|
||||
!document.isArchived &&
|
||||
!document.isDeleted &&
|
||||
!revision;
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<Background
|
||||
@@ -490,7 +496,7 @@ class DocumentScene extends React.Component<Props> {
|
||||
id={document.id}
|
||||
key={disableEmbeds ? "disabled" : "enabled"}
|
||||
innerRef={this.editor}
|
||||
multiplayer={team?.features?.multiplayerEditor}
|
||||
multiplayer={multiplayerEditor}
|
||||
shareId={shareId}
|
||||
isDraft={document.isDraft}
|
||||
template={document.isTemplate}
|
||||
|
||||
Reference in new issue
Block a user