Skip to content

Commit

Permalink
fix undefined error in functons handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingguo Yu committed Nov 10, 2017
1 parent 2079681 commit 4cb916d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ var unpackage = function ( packages )
{
return {
name: m.$.name,
line: Number( m.lines[ 0 ].line[ 0 ].$.number ),
hit: Number( m.lines[ 0 ].line[ 0 ].$.hits )
line: m.lines && m.lines[ 0 ] && m.lines[ 0 ].line ? Number( m.lines[ 0 ].line[ 0 ].$.number ):0,
hit: m.lines && m.lines[ 0 ] && m.lines[ 0 ].line ? Number( m.lines[ 0 ].line[ 0 ].$.hits ):0
};
} )
},
Expand Down

0 comments on commit 4cb916d

Please sign in to comment.