diff --git a/assets/js/pages/UpgradablePackagesPage/UpgradablePackagesPage.jsx b/assets/js/pages/UpgradablePackagesPage/UpgradablePackagesPage.jsx index 3b2b604c5f..4bcbd6b058 100644 --- a/assets/js/pages/UpgradablePackagesPage/UpgradablePackagesPage.jsx +++ b/assets/js/pages/UpgradablePackagesPage/UpgradablePackagesPage.jsx @@ -31,11 +31,13 @@ function UpgradablePackagesPage() { ); useEffect(() => { - const packageIDs = upgradablePackages.map( - ({ to_package_id: packageID }) => packageID - ); + if (upgradablePackages.length) { + const packageIDs = upgradablePackages.map( + ({ to_package_id: packageID }) => packageID + ); - dispatch(fetchUpgradablePackagesPatches({ hostID, packageIDs })); + dispatch(fetchUpgradablePackagesPatches({ hostID, packageIDs })); + } }, [upgradablePackages.length, hostID]); return (