We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e24d789 commit 196d3aaCopy full SHA for 196d3aa
src/patch/parse.js
@@ -95,7 +95,7 @@ export function parsePatch(uniDiff, options = {}) {
95
&& diffstr[i + 2].indexOf('@@') === 0) {
96
break;
97
}
98
- let operation = diffstr[i].length>0 ? diffstr[i][0] : ' ';
+ let operation = (diffstr[i].length==0 && i!=diffstr.length-1) ? ' ' : diffstr[i][0];
99
100
if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
101
hunk.lines.push(diffstr[i]);
0 commit comments