Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Fix added then staged then deleted files (#855)
Browse files Browse the repository at this point in the history
* Fix unstaged deleted staged added files

* Fix key error as well

* Fix lint
  • Loading branch information
drew-gross authored Nov 3, 2016
1 parent a36d60d commit 02b44eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/plugins/GitStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const GitStatusFile: React.StatelessComponent<GitStatusFileProps> = ({
{buttons.map(({buttonText, action}, index) => <span
style={buttonStyles}
onClick={action}
key={index.toString()}
>
{buttonText}
</span>)}
Expand Down Expand Up @@ -247,6 +248,15 @@ class GitStatusComponent extends React.Component<GitStatusProps, GitStatusState>
action: resetFile(file.value),
}],
});
unstagedFilesDescriptions.push({
absolutePath: absolutePath,
path: file.value,
state: "deleted",
buttons: [{
buttonText: "Add",
action: addFile(file.value),
}],
});
break;
case "StagedDeleted":
stagedFilesDescriptions.push({
Expand Down

0 comments on commit 02b44eb

Please sign in to comment.