perf: Navigation of shared trees feels slow (#3171)
* perf: Navigation of shared trees feels slow * remove redundant call to setActiveDocument Co-authored-by: Nan Yu <thenanyu@gmail.com>
This commit is contained in:
@@ -124,7 +124,13 @@ class UiStore {
|
||||
};
|
||||
|
||||
@action
|
||||
setActiveDocument = (document: Document): void => {
|
||||
setActiveDocument = (document: Document | string): void => {
|
||||
if (typeof document === "string") {
|
||||
this.activeDocumentId = document;
|
||||
this.observingUserId = undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
this.activeDocumentId = document.id;
|
||||
this.observingUserId = undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user