From b9ef24f8004624f024f9853842ea45903dc0afc7 Mon Sep 17 00:00:00 2001 From: bp-dev Date: Tue, 9 Jan 2018 14:22:53 -0500 Subject: [PATCH] Support patches with empty lines Code styling --- src/patch/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patch/parse.js b/src/patch/parse.js index db023526..d1af8d3d 100755 --- a/src/patch/parse.js +++ b/src/patch/parse.js @@ -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]);