diff options
author | bobzel <zzzman@gmail.com> | 2021-08-09 18:14:00 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-08-09 18:14:00 -0400 |
commit | dbdcff75d76fb54a0e085cc0958a07ded32d0b45 (patch) | |
tree | 4c24b49c750acefe567c79be4da49e92f6936e1f /src/client/views/collections/CollectionSubView.tsx | |
parent | 81ae5175aebf7e14a781a73d4a7cbaec0b8f3e4a (diff) |
fixed bug where shared list field items weren't being received as Documents so they didn't update -- eg add a private item to a list, then try to make it public
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
-rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index 227635c9b..2f07c0241 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -80,8 +80,8 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?: get childLayoutPairs(): { layout: Doc; data: Doc; }[] { const { Document, DataDoc } = this.props; const validPairs = this.childDocs.map(doc => Doc.GetLayoutDataDocPair(Document, !this.props.isAnnotationOverlay ? DataDoc : undefined, doc)). - filter(pair => { // filter out any documents that have a proto that we don't have permissions to (which we determine by not having any keys - return pair.layout && /*!pair.layout.hidden &&*/ (!pair.layout.proto || (pair.layout.proto instanceof Doc && GetEffectiveAcl(pair.layout.proto) !== AclPrivate));// Object.keys(pair.layout.proto).length)); + filter(pair => { // filter out any documents that have a proto that we don't have permissions to + return pair.layout && (!pair.layout.proto || (pair.layout.proto instanceof Doc && GetEffectiveAcl(pair.layout.proto) !== AclPrivate)); }); return validPairs.map(({ data, layout }) => ({ data: data as Doc, layout: layout! })); // this mapping is a bit of a hack to coerce types } |