Skip to content

Commit

Permalink
Fix crash in Avalonia
Browse files Browse the repository at this point in the history
  • Loading branch information
Xwilarg committed Jul 24, 2024
1 parent ad93a09 commit d89e894
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions downloader/Downloader/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
Expand Down Expand Up @@ -116,6 +117,8 @@ public MainViewModel()

public void LateInit()
{
if (Design.IsDesignMode) return;

string[] possiblePaths = ["../../../../../web/data/info.json", "Data/info.json"];
List<string> validData = new();
foreach (var path in possiblePaths)
Expand Down

0 comments on commit d89e894

Please sign in to comment.