diff --git a/PyPDF2/_reader.py b/PyPDF2/_reader.py index 7bff21ae8..43c79292e 100644 --- a/PyPDF2/_reader.py +++ b/PyPDF2/_reader.py @@ -834,8 +834,7 @@ def _build_outline(self, node: DictionaryObject) -> Optional[Destination]: if isinstance(dest, ArrayObject): outline = self._build_destination(title, dest) # type: ignore elif isinstance(dest, str) and dest in self._namedDests: - outline = self._namedDests[dest] - outline[NameObject("/Title")] = title # type: ignore + outline = self._build_destination(title, self._namedDests[dest].dest_array) # type: ignore else: raise PdfReadError(f"Unexpected destination {dest!r}")