Skip to content

Commit

Permalink
Sonar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandberger committed Jul 18, 2024
1 parent 6781351 commit 0fa4ea3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/discoverServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ function parseApplicationDescriptor(store, descriptor) {
);

if (descriptor.moduleDescriptors) {
list.push(...descriptor.moduleDescriptors?.map((i) => dispatchDescriptor(i)));
list.push(...descriptor.moduleDescriptors.map((i) => dispatchDescriptor(i)));
}

if (descriptor.uiModuleDescriptors) {
list.push(...descriptor.uiModuleDescriptors?.map((i) => dispatchDescriptor(i)));
list.push(...descriptor.uiModuleDescriptors.map((i) => dispatchDescriptor(i)));
}

if (descriptor.uiModules) {
list.push(...descriptor.uiModules?.map((i) => dispatchDescriptor(i)));
list.push(...descriptor.uiModules.map((i) => dispatchDescriptor(i)));
}

list.push(dispatchApplication(descriptor));
Expand Down Expand Up @@ -297,10 +297,7 @@ export function discoveryReducer(state = {}, action) {
for (const entry of action.data.permissionSets || []) {
permissions[entry.permissionName] = entry.displayName;
}
return Object.assign({}, state, {
permissionDisplayNames: state.permissionDisplayNames ?
Object.assign({}, state.permissionDisplayNames, permissions) : permissions,
});
return { permissionDisplayNames: { ...state.permissionDisplayNames, ...permissions } };
}
case 'DISCOVERY_PROVIDERS': {
if (action.data.provides?.length > 0) {
Expand Down

0 comments on commit 0fa4ea3

Please sign in to comment.