From 8acc0ceb472c5aae8031f91bc5cb97a57545f2a4 Mon Sep 17 00:00:00 2001 From: anchnk Date: Mon, 17 Dec 2018 18:18:48 +0100 Subject: [PATCH] cli,outdated: default homepage to an empty string This patch default package's homepage to an empty string in case the homepage isn't specificied in the package manifest. Before this patch, if at least one package didn't set an associated homepage, running npm outdated --long would break. After this patch, it won't display anything for this specific package Homepage row and it won't break for the other packages. --- lib/outdated.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outdated.js b/lib/outdated.js index 024e076c4f9ad..8486b395a6d7c 100644 --- a/lib/outdated.js +++ b/lib/outdated.js @@ -123,7 +123,7 @@ function makePretty (p) { var latest = p[4] var type = p[6] var deppath = p[7] - var homepage = p[0].package.homepage + var homepage = p[0].package.homepage || '' var columns = [ depname, has || 'MISSING',