Skip to content

Commit 1b8421a

Browse files
committed
Fix crash if there's no push branch
1 parent 5972657 commit 1b8421a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

magithub-ci.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ If magithub.ci.enabled is not set, CI is considered to be enabled."
6969
7070
Handles cases where the local branch's name is different than its
7171
remote counterpart."
72-
(cdr (thread-last (or branch (magit-get-current-branch))
73-
(magit-get-push-branch)
74-
(magit-split-branch-name))))
72+
(when-let ((push-branch (magit-get-push-branch
73+
(or branch (magit-get-current-branch)))))
74+
(cdr (magit-split-branch-name push-branch))))
7575

7676
(defun magithub-ci-status (ref)
7777
(if (magit-rebase-in-progress-p)

0 commit comments

Comments
 (0)