We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e996799 commit 2f6863bCopy full SHA for 2f6863b
src/utils/common.utils.ts
@@ -123,7 +123,9 @@ const convertObjectToMap = (data: { [k: string]: string }): InputKeyValue[] => {
123
* @param data - The object to convert.
124
* @returns An array of key-value pairs.
125
*/
126
-const convertObjectToMapRoles = (data: { [k: string]: Array<string> }): InputKeyValue[] => {
+const convertObjectToMapRoles = (data: { [k: string]: Array<string> } | null | undefined): InputKeyValue[] => {
127
+ if (isNullOrUndefined(data))
128
+ return []
129
const inputRoles: InputKeyValue[] = []
130
const mapRoles = new Map(Object.entries(data))
131
mapRoles.forEach((value, key) => {
0 commit comments