Skip to content
This repository was archived by the owner on Jul 2, 2022. It is now read-only.

Commit eb5ce3f

Browse files
committed
Trending Repositories fix
1 parent d7e7bdf commit eb5ce3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CodeHub.iOS/Views/Repositories/RepositoriesTrendingView.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ public override void ViewDidLoad()
3737
if (index < 0) index = 0;
3838
new PickerAlert(vm.Times.Select(x => x.Name).ToArray(), index, x =>
3939
{
40-
if (x < vm.Times.Length)
41-
vm.SelectedTime = vm.Times[x];
40+
var selectedTime = vm.Times.ElementAtOrDefault(x);
41+
if (selectedTime != null)
42+
vm.SelectedTime = selectedTime;
4243
}).Show();
4344
});
4445

0 commit comments

Comments
 (0)