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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user