From c5b7d9be139d36e8be03a47f31aead4d6c96a4b3 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 8 Sep 2020 20:48:52 -0700 Subject: [PATCH] fix: Flash of sidebar when navigating between documents --- app/scenes/Document/components/DataLoader.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/scenes/Document/components/DataLoader.js b/app/scenes/Document/components/DataLoader.js index 22b1a18c8..9b2f2abd0 100644 --- a/app/scenes/Document/components/DataLoader.js +++ b/app/scenes/Document/components/DataLoader.js @@ -102,6 +102,11 @@ class DataLoader extends React.Component { 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,