aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SharingManager.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-12-21 19:38:29 -0500
committerbobzel <zzzman@gmail.com>2022-12-21 19:38:29 -0500
commit631826f13c67aef760bc7e76665e152f1f63bf5b (patch)
tree8733aac0da4fcdf12277bf204a63c68ac7ac20aa /src/client/util/SharingManager.tsx
parente373e66f8ed06f4501e00af8348f15ad113c7424 (diff)
parent4c0de84cf9a3d5be2f5058d514c8ca58e2004a4b (diff)
cleaning up proxys and getFieldRef hopefully to be more understandable and efficient
Diffstat (limited to 'src/client/util/SharingManager.tsx')
-rw-r--r--src/client/util/SharingManager.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx
index 54ee691bc..ae4524b5e 100644
--- a/src/client/util/SharingManager.tsx
+++ b/src/client/util/SharingManager.tsx
@@ -290,7 +290,11 @@ export class SharingManager extends React.Component<{}> {
doc.backgroundColor = 'green';
} else {
const acls = doc[DataSym][AclSym];
- if (Object.keys(acls).every(key => (key === `acl-${Doc.CurrentUserEmailNormalized}` || key === 'acl-Me' ? true : [AclUnset, AclPrivate].includes(acls[key])))) {
+ if (
+ Object.keys(acls)
+ .filter(key => key !== `acl-${Doc.CurrentUserEmailNormalized}` && key !== 'acl-Me')
+ .every(key => [AclUnset, AclPrivate].includes(acls[key]))
+ ) {
doc.isShared = undefined;
doc.backgroundColor = undefined;
}