atariman486/node-ole-doc — pull request #1 by freezy (2013-11-25 11:31:41+00:00)
Title: Fixe crash on empty directory node.

When there's a directory entry that doesn't contain any children, the lib crashes:

node_modules\ole-doc\lib\ole-doc.js:161
if ( visitEntry.left !== DirectoryTree.Leaf ) {
^
TypeError: Cannot read property 'left' of undefined
at visit (node_modules\ole-doc\lib\ole-doc.js:161:22)
at DirectoryTree._getChildIds (node_modules\ole-doc\lib\ole-doc.js:174:4)
at DirectoryTree._buildHierarchy (node_modules\ole-doc\lib\ole-doc.js:135:24)
at DirectoryTree._buildHierarchy (node_modules\ole-doc\lib\ole-doc.js:152:12)
at Function._.each._.forEach (node_modules\ole-doc\node_modules\underscore\underscore.js:86:24)
at DirectoryTree._buildHierarchy (node_modules\ole-doc\lib\ole-doc.js:151:6)
at DirectoryTree.load (node_modules\ole-doc\lib\ole-doc.js:127:12)
at OleCompoundDoc._readSectors (node_modules\ole-doc\lib\ole-doc.js:410:10)
at Object.async.whilst (node_modules\ole-doc\node_modules\async\lib\async.js:562:13)
at async.whilst (node_modules\ole-doc\node_modules\async\lib\async.js:558:23)

Below there's a fix attached.