@rhc-shared-components/packages-table 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2507,7 +2507,7 @@ var PackagesTable = function PackagesTable(_ref) {
2507
2507
  var link_data = validPackages == null ? void 0 : validPackages.filter(function (rpm) {
2508
2508
  return rpm.name === name && rpm.architecture === arch;
2509
2509
  });
2510
- vulnerability.rpm_nvra_with_link_data.push(link_data[0]);
2510
+ link_data.length > 0 ? vulnerability.rpm_nvra_with_link_data.push(link_data[0]) : link_data = null;
2511
2511
  });
2512
2512
  } else {
2513
2513
  var _vulnerability$packag;
@@ -2533,6 +2533,9 @@ var PackagesTable = function PackagesTable(_ref) {
2533
2533
  return vulnerability.cve_id === value.cve_id;
2534
2534
  }) === index;
2535
2535
  });
2536
+ uniqueVulnerabilities.filter(function (vulnerability) {
2537
+ if (vulnerability.rpm_nvra_with_link_data.length > 0) return vulnerability;
2538
+ });
2536
2539
  setUniqueVulnerabilities(uniqueVulnerabilities);
2537
2540
  }, [rpms, vulnerabilities]);
2538
2541
  InsertCss();
@@ -2319,8 +2319,8 @@ const PackagesTable = ({
2319
2319
  name,
2320
2320
  arch
2321
2321
  }) => {
2322
- const link_data = validPackages == null ? void 0 : validPackages.filter(rpm => rpm.name === name && rpm.architecture === arch);
2323
- vulnerability.rpm_nvra_with_link_data.push(link_data[0]);
2322
+ let link_data = validPackages == null ? void 0 : validPackages.filter(rpm => rpm.name === name && rpm.architecture === arch);
2323
+ link_data.length > 0 ? vulnerability.rpm_nvra_with_link_data.push(link_data[0]) : link_data = null;
2324
2324
  });
2325
2325
  } else {
2326
2326
  var _vulnerability$packag;
@@ -2338,6 +2338,9 @@ const PackagesTable = ({
2338
2338
  uniqueVulnerabilities.sort(vulnerability => severitySortOrder[vulnerability.severity]);
2339
2339
  // filter out vulnerabilities with duplicate CVE IDs
2340
2340
  uniqueVulnerabilities.filter((value, index, self) => self.findIndex(vulnerability => vulnerability.cve_id === value.cve_id) === index);
2341
+ uniqueVulnerabilities.filter(vulnerability => {
2342
+ if (vulnerability.rpm_nvra_with_link_data.length > 0) return vulnerability;
2343
+ });
2341
2344
  setUniqueVulnerabilities(uniqueVulnerabilities);
2342
2345
  }, [_rpms, _vulnerabilities]);
2343
2346
  InsertCss();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhc-shared-components/packages-table",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "project description",
5
5
  "author": "redhatofficial",
6
6
  "license": "MIT",