Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
Require that description be a string if set
Browse files Browse the repository at this point in the history
re: isaacs/npm#2780
  • Loading branch information
isaacs committed Sep 8, 2012
1 parent e5eb478 commit c987fe4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions registry/validate_doc_update.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ module.exports = function (doc, oldDoc, user, dbCtx) {
"Please update your publish scripts.") "Please update your publish scripts.")
} }


if (doc.description) {
assert(typeof doc.description === 'string',
'"description" field must be a string')
}


// at this point, we've passed the basic sanity tests. // at this point, we've passed the basic sanity tests.
// Time to dig into more details. // Time to dig into more details.
Expand Down

0 comments on commit c987fe4

Please sign in to comment.