Skip to content

Commit

Permalink
Merge pull request #96 from thomasclaudiushuber/issue/95
Browse files Browse the repository at this point in the history
Fix null warning in ViewModelAttributeInspector
  • Loading branch information
thomasclaudiushuber authored Dec 10, 2023
2 parents e6d3dc8 + 6ba7912 commit 7825aae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal static bool InspectGenerateConstructor(AttributeData viewModelAttribute

internal static string InspectCommandType(AttributeData viewModelAttributeData)
{
string commandType = "DelegateCommand";
string? commandType = null;

foreach (var arg in viewModelAttributeData.NamedArguments)
{
Expand All @@ -67,7 +67,7 @@ internal static string InspectCommandType(AttributeData viewModelAttributeData)
}
}

return commandType;
return commandType ?? "DelegateCommand";
}
}
}

0 comments on commit 7825aae

Please sign in to comment.