Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 02ebca1

Browse files
Fixing syntax error
1 parent df86288 commit 02ebca1

File tree

1 file changed

+6
-2
lines changed
  • src/UnityExtension/Assets/Editor/GitHub.Unity/UI

1 file changed

+6
-2
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/Window.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,21 @@ private bool MaybeUpdateData(out string repoRemote)
192192
bool repoDataChanged = false;
193193
if (Repository != null)
194194
{
195-
if (repoBranch != Repository.CurrentBranch)
195+
var currentBranchString = (Repository.CurrentBranch.HasValue ? Repository.CurrentBranch.Value.Name : null);
196+
if (repoBranch != currentBranchString)
196197
{
197-
repoBranch = Repository.CurrentBranch;
198+
repoBranch = currentBranchString;
198199
repoDataChanged = true;
199200
}
201+
200202
var url = Repository.CloneUrl != null ? Repository.CloneUrl.ToString() : DefaultRepoUrl;
201203
if (repoUrl != url)
202204
{
203205
repoUrl = url;
204206
repoDataChanged = true;
205207
}
208+
209+
206210
repoRemote = Repository.CurrentRemote.Value.Name;
207211
}
208212
else if (!HasRepository)

0 commit comments

Comments
 (0)