LoginSignup
2
1

More than 5 years have passed since last update.

Atom の git-control が開けない場合の対処

Posted at

問題

Atom の git-control パッケージを使ってみようとしたら次のエラーが出て開けなかった。

Uncaught TypeError: Cannot read property 'split' of undefined

スクリーンショット 2018-04-20 1.05.52.png

解決

View Issue のリンク先の issue のコメント

Uncaught TypeError: Cannot read property 'split' of undefined · Issue #259 · jacogr/atom-git-control · GitHub

に従って /Users/user/.atom/packages/git-control/lib/git-control-view.coffee(mac の場合)の 76 行目を次に変更して、Atom を再起動することで開けるようになった。

if git.getRepository().path
   @setWorkspaceTitle(git.getRepository().path.split('/').reverse()[1])
else
   @setWorkspaceTitle(git.getRepository().repo.workingDirectory.split('/').reverse()[0])
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1