diff --git a/src/package-request.js b/src/package-request.js index 846c769e29..6b35037474 100644 --- a/src/package-request.js +++ b/src/package-request.js @@ -440,7 +440,7 @@ export default class PackageRequest { // Make sure to always output `exotic` versions to be compatible with npm const isDepOld = ({current, latest, wanted}) => - latest === 'exotic' || (semver.lt(current, wanted) || semver.lt(current, latest)); + latest === undefined || latest === 'exotic' || (semver.lt(current, wanted) || semver.lt(current, latest)); const orderByName = (depA, depB) => depA.name.localeCompare(depB.name); return deps.filter(isDepOld).sort(orderByName); }