Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1558 from atom/tt-18-jun-co-authors-bug
Browse files Browse the repository at this point in the history
Fix uncaught exception when undoing coauthored commit
  • Loading branch information
Tilde Ann Thurium committed Jun 29, 2018
2 parents 6b2b700 + 64da7da commit 380a503
Show file tree
Hide file tree
Showing 4 changed files with 1,740 additions and 1,692 deletions.
7 changes: 6 additions & 1 deletion lib/controllers/git-tab-controller.js
Expand Up @@ -3,6 +3,7 @@ import path from 'path';
import React from 'react';
import PropTypes from 'prop-types';

import Author from '../models/author';
import GitTabView from '../views/git-tab-view';
import UserStore from '../models/user-store';
import {
Expand Down Expand Up @@ -268,7 +269,11 @@ export default class GitTabController extends React.Component {
const lastCommit = await repo.getLastCommit();
if (lastCommit.isUnbornRef()) { return null; }
repo.setCommitMessage(lastCommit.getFullMessage());
this.updateSelectedCoAuthors(lastCommit.getCoAuthors());

const coAuthors = lastCommit.getCoAuthors().map(author =>
new Author(author.email, author.name));

this.updateSelectedCoAuthors(coAuthors);
return repo.undoLastCommit();
}

Expand Down

0 comments on commit 380a503

Please sign in to comment.