Skip to content

Commit 93f1a54

Browse files
authored
Merge pull request #4 from ArtskydJ/patch-1
2 parents 24c7afb + 95361ce commit 93f1a54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎index.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ module.exports = {
298298
return pair.combine()
299299
},
300300

301-
splitPatch(patch, options) {
301+
splitPatch(patch, options = {}) {
302302
let parsedPatch = diff.parsePatch(patch)
303303
let output = []
304304

@@ -308,6 +308,9 @@ module.exports = {
308308
}
309309

310310
for(let patch of parsedPatch) {
311+
if (!patch.oldFileName || !patch.newFileName) {
312+
continue
313+
}
311314
let pair = new Pair(
312315
new HunkHeader(),
313316
new HunkHeader()

0 commit comments

Comments
 (0)