Skip to content

Commit

Permalink
view: set modified to undefined when not retrievable (#153)
Browse files Browse the repository at this point in the history
PR-URL: #153
Credit: @simonua
Reviewed-By: @zkat
  • Loading branch information
simonua authored and zkat committed Feb 18, 2019
1 parent 2f74823 commit 414c357
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function prettyView (packument, manifest, opts) {
name: color.yellow(manifest._npmUser.name),
email: color.cyan(manifest._npmUser.email)
}),
modified: color.yellow(relativeDate(packument.time[packument.version])),
modified: packument.time ? color.yellow(relativeDate(packument.time[packument.version])) : undefined,
maintainers: (packument.maintainers || []).map((u) => unparsePerson({
name: color.yellow(u.name),
email: color.cyan(u.email)
Expand Down

0 comments on commit 414c357

Please sign in to comment.