Skip to content

Commit

Permalink
Support patches with empty lines
Browse files Browse the repository at this point in the history
Code styling
  • Loading branch information
bp-dev authored and kpdecker committed Mar 5, 2018
1 parent 10aaabb commit b9ef24f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/patch/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function parsePatch(uniDiff, options = {}) {
&& diffstr[i + 2].indexOf('@@') === 0) {
break;
}
let operation = (diffstr[i].length==0 && i!=diffstr.length-1) ? ' ' : diffstr[i][0];
let operation = (diffstr[i].length == 0 && i != (diffstr.length - 1)) ? ' ' : diffstr[i][0];

if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
hunk.lines.push(diffstr[i]);
Expand Down

0 comments on commit b9ef24f

Please sign in to comment.