1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-04 17:43:39 +00:00

[AC-2431] New collection dialog bug (#8648)

* [AC-2431] Add null check for convertToPermission helper

* [AC-2431] Only attempt to convertToPermission if collectionId has a value
This commit is contained in:
Shane Melton
2024-04-12 08:51:20 -07:00
committed by GitHub
parent 5f97f4c4a8
commit 2e8d1a2061
2 changed files with 17 additions and 6 deletions

View File

@@ -101,7 +101,12 @@ export const getPermissionList = (flexibleCollectionsEnabled: boolean): Permissi
* for the dropdown in the AccessSelectorComponent
* @param value
*/
export const convertToPermission = (value: CollectionAccessSelectionView) => {
export const convertToPermission = (
value: CollectionAccessSelectionView | undefined,
): CollectionPermission | undefined => {
if (value == null) {
return undefined;
}
if (value.manage) {
return CollectionPermission.Manage;
} else if (value.readOnly) {