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

Commit 9e5a78f

Browse files
Fixing Window.MaybeUpdateData not to return true every time when Repo is null
1 parent ccfeef3 commit 9e5a78f

File tree

1 file changed

+11
-7
lines changed
  • src/UnityExtension/Assets/Editor/GitHub.Unity/UI

1 file changed

+11
-7
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,19 @@ private bool MaybeUpdateData(out string repoRemote)
211211
}
212212
else if (!HasRepository)
213213
{
214-
repoBranch = null;
215-
repoUrl = null;
216-
}
214+
if (repoBranch != null)
215+
{
216+
repoBranch = null;
217+
repoDataChanged = true;
218+
}
217219

218-
if (repoUrl == null)
219-
{
220-
repoUrl = DefaultRepoUrl;
221-
repoDataChanged = true;
220+
if (repoUrl != DefaultRepoUrl)
221+
{
222+
repoUrl = DefaultRepoUrl;
223+
repoDataChanged = true;
224+
}
222225
}
226+
223227
return repoDataChanged;
224228
}
225229

0 commit comments

Comments
 (0)