🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-diff-view

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-diff-view - npm Package Compare versions

Comparing version

to
1.4.11

2

package.json
{
"name": "react-diff-view",
"version": "1.4.10",
"version": "1.4.11",
"description": "A git diff component to consume the git unified diff output.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -513,1 +513,5 @@ # react-diff-view

- Fix a logic bug when split range of lines into valid ones.
### 1.4.11
- Fix a bug where a stub hunk will crash the hunk insertion.

@@ -327,3 +327,10 @@ import leven from 'leven';

const insertionOldLineNumber = computeOldLineNumber(insertion.changes[0]);
const insertPosition = hunks.findIndex(hunk => computeOldLineNumber(hunk.changes[0]) >= insertionOldLineNumber);
const isLaterThanInsertion = ({changes}) => {
if (!changes.length) {
return false;
}
return computeOldLineNumber(changes[0]) >= insertionOldLineNumber;
};
const insertPosition = hunks.findIndex(isLaterThanInsertion);
const hunksWithInsertion = insertPosition === -1

@@ -330,0 +337,0 @@ ? hunks.concat(insertion)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet