From ce389b61548ca07f2ce6ce48888b62546300d2f0 Mon Sep 17 00:00:00 2001 From: hexxa Date: Sun, 23 Jan 2022 18:16:43 +0800 Subject: [PATCH] fix(fe/state_updater): sharingCtrl is not set before initCwd --- src/client/web/src/components/state_updater.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/web/src/components/state_updater.ts b/src/client/web/src/components/state_updater.ts index efd4a90..773852e 100644 --- a/src/client/web/src/components/state_updater.ts +++ b/src/client/web/src/components/state_updater.ts @@ -539,10 +539,9 @@ export class Updater { this.initUITree(); - const isInSharingMode = this.props.ui.control.controls.get(sharingCtrl); + const isInSharingMode = paramMap.get(shareDirQuery) !== ""; if ( - (this.props.login.userRole === roleVisitor && - isInSharingMode === ctrlOn) || + (this.props.login.userRole === roleVisitor && isInSharingMode) || this.props.login.userRole === roleUser || this.props.login.userRole === roleAdmin ) {