Skip to content

Commit

Permalink
Merge pull request #5535 from erw13n/feature/5533-CKE-Settings-Null-C…
Browse files Browse the repository at this point in the history
…hecker

Fix #5533 - Null checker on EditorHostSetting
  • Loading branch information
valadas authored Feb 8, 2023
2 parents 8c31fc4 + cbe86bf commit 32576bb
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 32576bb

Please # to comment.