diff --git a/packages/robot/src/robotcode/robot/diagnostics/library_doc.py b/packages/robot/src/robotcode/robot/diagnostics/library_doc.py index 8369935b3..49cf569c2 100644 --- a/packages/robot/src/robotcode/robot/diagnostics/library_doc.py +++ b/packages/robot/src/robotcode/robot/diagnostics/library_doc.py @@ -1941,8 +1941,9 @@ def get_args_to_process(libdoc_name: str, kw_name: str) -> Any: def _yield_type_info(info: TypeInfo) -> Iterable[TypeInfo]: if not info.is_union: yield info - for nested in info.nested: - yield from _yield_type_info(nested) + if info.nested: + for nested in info.nested: + yield from _yield_type_info(nested) def _get_type_docs(keywords: List[Any], custom_converters: List[Any]) -> Set[RobotTypeDoc]: type_docs: Dict[RobotTypeDoc, Set[str]] = {}