Skip to content

Commit

Permalink
Fix #5533 - Null checker on EditorHostSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
erw13n authored and valadas committed Feb 8, 2023
1 parent 683ba7d commit 04cef3c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ internal static EditorProviderSettings LoadEditorSettingsByKey(
typeof(CodeMirror).GetProperties()
.Where(codeMirrorInfo => !codeMirrorInfo.Name.Equals("Theme")))
{
settingValue = filteredSettings.FirstOrDefault(setting => setting.Name.Equals(string.Format("{0}{1}", key, codeMirrorInfo.Name))).Value;
settingValue = filteredSettings.FirstOrDefault(setting => setting.Name.Equals(string.Format("{0}{1}", key, codeMirrorInfo.Name)))?.Value;
switch (codeMirrorInfo.PropertyType.Name)
{
case "String":
Expand Down Expand Up @@ -207,7 +207,7 @@ internal static EditorProviderSettings LoadEditorSettingsByKey(
case "WordCount":
foreach (var wordCountInfo in typeof(WordCountConfig).GetProperties())
{
settingValue = filteredSettings.FirstOrDefault(setting => setting.Name.Equals(string.Format("{0}{1}", key, wordCountInfo.Name))).Value;
settingValue = filteredSettings.FirstOrDefault(setting => setting.Name.Equals(string.Format("{0}{1}", key, wordCountInfo.Name)))?.Value;
switch (wordCountInfo.PropertyType.Name)
{
case "String":
Expand Down

0 comments on commit 04cef3c

Please # to comment.