mirror of
https://github.com/harness/drone.git
synced 2025-05-09 02:19:48 +08:00
feat: [code-791]: fixed deleted lines issue (#377)
This commit is contained in:
parent
332c8d0a27
commit
ec20dec12c
@ -244,7 +244,7 @@ export const Changes: React.FC<ChangesProps> = ({
|
||||
vars={{
|
||||
changedFilesLink: <ChangesDropdown diffs={diffs} />,
|
||||
addedLines: formatNumber(diffStats.addedLines),
|
||||
deletedLines: formatNumber(diffStats.deletedLines),
|
||||
deletedLines: diffStats.deletedLines ? formatNumber(diffStats.deletedLines) : '0',
|
||||
configuration: (
|
||||
<DiffViewConfiguration
|
||||
viewStyle={viewStyle}
|
||||
|
@ -50,7 +50,6 @@ const CommitRangeDropdown: React.FC<CommitRangeDropdownProps> = ({
|
||||
setSelectedCommits
|
||||
}) => {
|
||||
const { getString } = useStrings()
|
||||
|
||||
const allCommitsSHA = allCommits.map(commit => commit.sha as string)
|
||||
|
||||
useEffect(() => {
|
||||
@ -63,7 +62,7 @@ const CommitRangeDropdown: React.FC<CommitRangeDropdownProps> = ({
|
||||
event: React.MouseEvent<HTMLInputElement | HTMLDivElement, MouseEvent>,
|
||||
selectedCommitSHA: string
|
||||
) => {
|
||||
if (event.shiftKey || selectedCommits.length > 1) {
|
||||
if (event.shiftKey) {
|
||||
// Select Commit
|
||||
setSelectedCommits(current => {
|
||||
if (current.includes(selectedCommitSHA)) {
|
||||
|
Loading…
Reference in New Issue
Block a user