@@ -15,7 +15,7 @@ var _tree = Checkout.tree;
1515* @return {Void } checkout complete
1616*/
1717Checkout . head = function ( url , options ) {
18- options = normalizeOptions ( options , NodeGit . CheckoutOptions ) ;
18+ options = normalizeOptions ( options || { } , NodeGit . CheckoutOptions ) ;
1919
2020 return _head . call ( this , url , options ) ;
2121} ;
@@ -30,7 +30,7 @@ Checkout.head = function(url, options) {
3030* @return {Void } checkout complete
3131*/
3232Checkout . index = function ( repo , index , options ) {
33- options = normalizeOptions ( options , NodeGit . CheckoutOptions ) ;
33+ options = normalizeOptions ( options || { } , NodeGit . CheckoutOptions ) ;
3434
3535 return _index . call ( this , repo , index , options ) ;
3636} ;
@@ -45,7 +45,7 @@ Checkout.index = function(repo, index, options) {
4545* @return {Void } checkout complete
4646*/
4747Checkout . tree = function ( repo , treeish , options ) {
48- options = normalizeOptions ( options , NodeGit . CheckoutOptions ) ;
48+ options = normalizeOptions ( options || { } , NodeGit . CheckoutOptions ) ;
4949
5050 return _tree . call ( this , repo , treeish , options ) ;
5151} ;
0 commit comments