isaacs/npm — pull request #2411 by mekwall (2012-05-03 13:38:10+00:00)
Title: Solves reduce on undefined when (optional) dependency failed to install

Can be reproduced by trying to install [connect-redis](https://github.com/visionmedia/connect-redis) on Windows which has hiredis as an optional dependency.

Line 381 throws `TypeError: Cannot call method 'reduce' of undefined`

So when `d` is not defined, pass an empty array instead.