diff options
author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-08-19 15:00:39 -0700 |
---|---|---|
committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-08-19 15:00:39 -0700 |
commit | 4c0eccd355cedb0a6bdfbe1dbf8944c4b503c4d6 (patch) | |
tree | b475c0f9b1a9cafff8fdccf9733e0d6885cd91fd /src/client/util/SharingManager.tsx | |
parent | c88501a12b52e004518a2c9996ee90ce48235e93 (diff) | |
parent | f962986693267e30ca18884e6f04e402181a5a1a (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into bug_fixes
Diffstat (limited to 'src/client/util/SharingManager.tsx')
-rw-r--r-- | src/client/util/SharingManager.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx index 5a863c813..b9918e900 100644 --- a/src/client/util/SharingManager.tsx +++ b/src/client/util/SharingManager.tsx @@ -82,15 +82,15 @@ export default class SharingManager extends React.Component<{}> { // return this.sharingDoc ? this.sharingDoc[PublicKey] !== SharingPermissions.None : false; // } - public open = (target: DocumentView) => { + public open = (target?: DocumentView, target_doc?: Doc) => { runInAction(() => this.users = []); // SelectionManager.DeselectAll(); this.populateUsers(); runInAction(() => { this.targetDocView = target; - this.targetDoc = target.props.Document; + this.targetDoc = target_doc || target?.props.Document; DictationOverlay.Instance.hasActiveModal = true; - this.isOpen = true; + this.isOpen = this.targetDoc !== undefined; this.permissions = SharingPermissions.Edit; }); this.targetDoc!.author === Doc.CurrentUserEmail && !this.targetDoc![`ACL-${Doc.CurrentUserEmail.replace(".", "_")}`] && distributeAcls(`ACL-${Doc.CurrentUserEmail.replace(".", "_")}`, SharingPermissions.Admin, this.targetDoc!); |