Skip to content

Commit

Permalink
Added default for filename
Browse files Browse the repository at this point in the history
parseDiff occassionally parses wrong filenames, for example on --
--------------, we get undefined from the file.to. This prevents that
from breaking the app.
  • Loading branch information
vctr-dev committed Mar 22, 2019
1 parent ec72ed8 commit f8e1596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/git/changed-chunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ChangedChunks {
}
}

function compareFileNames(fileNameA, fileNameB) {
function compareFileNames(fileNameA = '', fileNameB = '') {
const filePartsA = fileNameA.split('/').reverse();
const filePartsB = fileNameB.split('/').reverse();

Expand Down

0 comments on commit f8e1596

Please sign in to comment.