From 6eff368f943117b91c4a9d89d340e0819e0cc0e9 Mon Sep 17 00:00:00 2001 From: halgari Date: Tue, 25 Jun 2024 22:46:54 -0600 Subject: [PATCH] Fix the `Version` exception --- .../Pages/Downloads/ViewModels/DownloadTaskViewModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NexusMods.App.UI/Pages/Downloads/ViewModels/DownloadTaskViewModel.cs b/src/NexusMods.App.UI/Pages/Downloads/ViewModels/DownloadTaskViewModel.cs index 13a7d9f71d..9e48291e6d 100644 --- a/src/NexusMods.App.UI/Pages/Downloads/ViewModels/DownloadTaskViewModel.cs +++ b/src/NexusMods.App.UI/Pages/Downloads/ViewModels/DownloadTaskViewModel.cs @@ -36,7 +36,8 @@ public DownloadTaskViewModel(IDownloadTask task) .BindTo(this, x => x.Name) .DisposeWith(d); - _task.WhenAnyValue(t => t.PersistentState.Version) + _task.WhenAnyValue(t => t.PersistentState) + .Select(state => DownloaderState.Version.TryGet(state, out var version) ? version : "-" ) .OnUI() .BindTo(this, x => x.Version) .DisposeWith(d);