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

Commit ba971ce

Browse files
authored
Merge pull request #260 from github-for-unity/fixes/window-update-loop
Fixing Window.MaybeUpdateData when Repository is null
2 parents 4aab207 + e09591e commit ba971ce

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
@@ -208,15 +208,19 @@ private bool MaybeUpdateData(out string repoRemote)
208208
}
209209
else if (!HasRepository)
210210
{
211-
repoBranch = null;
212-
repoUrl = null;
213-
}
211+
if (repoBranch != null)
212+
{
213+
repoBranch = null;
214+
repoDataChanged = true;
215+
}
214216

215-
if (repoUrl == null)
216-
{
217-
repoUrl = DefaultRepoUrl;
218-
repoDataChanged = true;
217+
if (repoUrl != DefaultRepoUrl)
218+
{
219+
repoUrl = DefaultRepoUrl;
220+
repoDataChanged = true;
221+
}
219222
}
223+
220224
return repoDataChanged;
221225
}
222226

0 commit comments

Comments
 (0)