diff options
author | bobzel <zzzman@gmail.com> | 2023-07-13 21:05:23 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-07-13 21:05:23 -0400 |
commit | 6503f182a4534119a9ae27a9decf884db70775c3 (patch) | |
tree | af3e7798e82f4c3fdecccb51925daec534432791 | |
parent | f96fb8dc3e430f93b7a7f3a57fa3fb3d83c813c9 (diff) |
from last - fixed one problem with group sharing, others exist (remove/adding meber from group after sharing has been done doesn't take effect until browser refresh)
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 2 | ||||
-rw-r--r-- | src/client/util/SharingManager.tsx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 7832b1c87..7d0b477e2 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -783,7 +783,6 @@ export class CurrentUserUtils { const sharedDocOpts:DocumentOptions = { title: "My Shared Docs", userColor: "rgb(202, 202, 202)", - data_dashboards: new List<Doc>(), isFolder:true, undoIgnoreFields:new List<string>(['treeViewSortCriterion']), // childContextMenuFilters: new List<ScriptField>([dashboardFilter!,]), // childContextMenuScripts: new List<ScriptField>([addToDashboards!,]), @@ -797,6 +796,7 @@ export class CurrentUserUtils { }; DocUtils.AssignDocField(doc, "mySharedDocs", opts => Docs.Create.TreeDocument([], opts, sharingDocumentId + "layout", sharingDocumentId), sharedDocOpts, undefined, sharedScripts); + if (!DocCast(doc.mySharedDocs).data_dashboards) DocCast(doc.mySharedDocs).data_dashboards = new List<Doc>(); } /// Import option on the left side button panel diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx index 587e1e585..8e5ae7bc0 100644 --- a/src/client/util/SharingManager.tsx +++ b/src/client/util/SharingManager.tsx @@ -251,7 +251,7 @@ export class SharingManager extends React.Component<{}> { removeMember = (group: Doc, emailId: string) => { const user: ValidatedUser = this.users.find(({ user: { email } }) => email === emailId)!; - if (group.docsShared) { + if (group.docsShared && user) { DocListCastAsync(user.sharingDoc[storage]).then(userdocs => DocListCastAsync(group.docsShared).then(dl => { const remaining = userdocs?.filter(doc => !dl?.includes(doc)) || []; |