isaacs/npmjs.org — pull request #48 by dandean (2011-12-24 07:31:37+00:00)
Title: Check for doc.description before calling string methods on it.

There are times when a package does not have a `description` property in CouchDB. Unfortunately, the client app assumes this property exists and is a string, so calls the `split` method on it. This throws an error.

For example, try viewing all packages by @mde:

http://search.npmjs.org/#/_author/Matthew%20Eernisse

The page will never load, as neither of the package.json files for his modules contain a `description` property:

https://github.com/mde/geddy/blob/master/package.json
https://github.com/mde/jake/blob/master/package.json

This pull request checks for the `description` property before using it.