Skip to content

Commit

Permalink
Update src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs
Browse files Browse the repository at this point in the history
Co-authored-by: Eastman <[email protected]>
  • Loading branch information
Ndiritu and andrueastman authored Oct 5, 2023
1 parent a492afd commit bd35919
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Kiota.Builder/Refiners/CommonLanguageRefiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,7 @@ private static CodeTypeBase ConvertComposedTypeToWrapper(CodeClass codeClass, Co
if (!supportsInnerClasses)
{
var @namespace = codeClass.GetImmediateParentOfType<CodeNamespace>();
var existingClass = @namespace.FindChildByName<CodeClass>(codeComposedType.Name, false);
if (existingClass != null && existingClass.OriginalComposedType == null)
if (@namespace.FindChildByName<CodeClass>(codeComposedType.Name, false) is CodeClass { OriginalComposedType: null })
codeComposedType.Name = $"{codeComposedType.Name}Wrapper";
newClass = @namespace.AddClass(new CodeClass
{
Expand Down

0 comments on commit bd35919

Please sign in to comment.