Skip to content

Commit

Permalink
Intialize script list when loaded for the very first time
Browse files Browse the repository at this point in the history
  • Loading branch information
cezarypiatek committed Jun 16, 2022
1 parent 23e4002 commit 90a923e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class ScriptRunnerAppSettings
{
public LayoutSettings? Layout { get; set; }
public Dictionary<string, CommandInstallationStatus> InstalledActions { get; set; }
public List<string> ConfigScripts { get; set; }
public List<string>? ConfigScripts { get; set; }

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using ReactiveUI;
Expand All @@ -22,7 +23,7 @@ public ObservableCollection<ConfigScriptFileRow> ConfigScriptFiles

public SettingsWindowViewModel()
{
var configScripts = AppSettingsService.Load().ConfigScripts;
var configScripts = AppSettingsService.Load().ConfigScripts ?? new List<string>();
ConfigScriptFiles =
new ObservableCollection<ConfigScriptFileRow>(configScripts.Select(path => new ConfigScriptFileRow(path, SaveConfigScripts)));
}
Expand Down

0 comments on commit 90a923e

Please sign in to comment.