Skip to content

Commit cf09fba

Browse files
simonuazkat
authored andcommitted
view: set modified to undefined when not retrievable (#153)
PR-URL: #153 Credit: @simonua Reviewed-By: @zkat
1 parent 684bccf commit cf09fba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function prettyView (packument, manifest, opts) {
243243
name: color.yellow(manifest._npmUser.name),
244244
email: color.cyan(manifest._npmUser.email)
245245
}),
246-
modified: color.yellow(relativeDate(packument.time[packument.version])),
246+
modified: packument.time ? color.yellow(relativeDate(packument.time[packument.version])) : undefined,
247247
maintainers: (packument.maintainers || []).map((u) => unparsePerson({
248248
name: color.yellow(u.name),
249249
email: color.cyan(u.email)

0 commit comments

Comments
 (0)