Skip to content

Commit

Permalink
Fixed bug where allowedCollection passed is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
gbubemismith committed Oct 14, 2024
1 parent c1cbece commit 567ec0e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export class DefaultCipherAuthorizationService implements CipherAuthorizationSer
.decryptedCollectionViews$(cipher.collectionIds as CollectionId[])
.pipe(
map((allCollections) => {
const collections = allowedCollections
const shouldFilter = allowedCollections?.some(Boolean);

const collections = shouldFilter
? allCollections.filter((c) => allowedCollections.includes(c.id as CollectionId))
: allCollections;

Expand Down

0 comments on commit 567ec0e

Please sign in to comment.