mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #4448 from bonanitech/first-commit-has-no-parents
Don't try to load the parents of the first commit
This commit is contained in:
		| @@ -647,9 +647,9 @@ RED.sidebar.versionControl = (function() { | ||||
|                             $.getJSON("projects/"+activeProject.name+"/commits/"+entry.sha,function(result) { | ||||
|                                 result.project = activeProject; | ||||
|                                 result.parents = entry.parents; | ||||
|                                 result.oldRev = entry.sha+"~1"; | ||||
|                                 result.oldRev = entry.parents[0].length !== 0 ? entry.sha+"~1" : entry.sha; | ||||
|                                 result.newRev = entry.sha; | ||||
|                                 result.oldRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7)+"~1"; | ||||
|                                 result.oldRevTitle = entry.parents[0].length !== 0 ? RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7)+"~1" : " "; | ||||
|                                 result.newRevTitle = RED._("sidebar.project.versionControl.commitCapital")+" "+entry.sha.substring(0,7); | ||||
|                                 result.date = humanizeSinceDate(parseInt(entry.date)); | ||||
|                                 RED.diff.showCommitDiff(result); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user