Skip to content

Commit a85825e

Browse files
author
Tom Ruggles
committed
Sometimes dirtoparent is not defined. Parent.path() is though so it should still be ok.
1 parent f523b6b commit a85825e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/tree_entry.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ TreeEntry.prototype.getBlob = function(callback) {
7979
* @return {String}
8080
*/
8181
TreeEntry.prototype.path = function(callback) {
82-
return path.join(this.parent.path(), this.dirtoparent, this.filename());
82+
console.log({
83+
path: this.parent.path(),
84+
dirtoparent: this.dirtoparent,
85+
filename: this.filename()});
86+
var dirtoparent = this.dirtoparent || "";
87+
return path.join(this.parent.path(), dirtoparent, this.filename());
8388
};
8489

8590
/**

0 commit comments

Comments
 (0)