From 57a1f06b7899098f9cb04f1ee62c9fbced191d03 Mon Sep 17 00:00:00 2001 From: rkodev <43806892+rkodev@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:12:30 +0300 Subject: [PATCH] Fix function writer --- src/Kiota.Builder/Writers/TypeScript/CodeFunctionWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kiota.Builder/Writers/TypeScript/CodeFunctionWriter.cs b/src/Kiota.Builder/Writers/TypeScript/CodeFunctionWriter.cs index 1710944648..af0331846e 100644 --- a/src/Kiota.Builder/Writers/TypeScript/CodeFunctionWriter.cs +++ b/src/Kiota.Builder/Writers/TypeScript/CodeFunctionWriter.cs @@ -117,7 +117,7 @@ private void WriteComposedTypeSerializer(CodeFunction codeElement, LanguageWrite private void WriteSerializationFunctionForCodeIntersectionType(CodeComposedTypeBase composedType, CodeParameter composedParam, CodeFunction method, LanguageWriter writer) { - foreach (var mappedType in composedType.Types.Where(x => !IsPrimitiveType(x, composedType))) + foreach (var mappedType in composedType.Types.Where(x => !IsPrimitiveType(x, composedType) && x.TypeDefinition != null)) { var functionName = GetSerializerFunctionName(method, mappedType); var variableName = composedParam.Name.ToFirstCharacterLowerCase();