fix: Flash of sidebar when navigating between documents

This commit is contained in:
Tom Moor
2020-09-08 20:48:52 -07:00
parent be2e46b5d2
commit c5b7d9be13

View File

@@ -102,6 +102,11 @@ class DataLoader extends React.Component<Props> {
loadDocument = async () => {
const { shareId, documentSlug, revisionId } = this.props.match.params;
// sets the document as active in the sidebar if we already have it loaded
if (this.document) {
this.props.ui.setActiveDocument(this.document);
}
try {
this.document = await this.props.documents.fetch(documentSlug, {
shareId,