File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed
Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -150,11 +150,13 @@ export const Layout = () => {
150150 < VersionsNav />
151151 < OriginalLayout
152152 beforeOutline = {
153- < X . p className = "rp-doc" style = { { marginBottom : 16 } } >
154- < Link href = { pdfLink } target = "_blank" rel = "noopener noreferrer" >
155- { t ( 'view_docs_as_pdf' ) }
156- </ Link >
157- </ X . p >
153+ pdfLink && (
154+ < X . p className = "rp-doc" style = { { marginBottom : 16 } } >
155+ < Link href = { pdfLink } target = "_blank" rel = "noopener noreferrer" >
156+ { t ( 'view_docs_as_pdf' ) }
157+ </ Link >
158+ </ X . p >
159+ )
158160 }
159161 />
160162 </ ForceRenderContext >
Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ export const Link = (props: LinkProps) => {
1313 return (
1414 < OriginalLink
1515 { ...props }
16- download = { props . href ?. endsWith ( '.pdf' ) && props . download !== false }
16+ download = {
17+ // type-coverage:ignore-next-line -- out of control
18+ props . download == null
19+ ? props . href ?. endsWith ( '.pdf' )
20+ : // type-coverage:ignore-next-line -- out of control
21+ ( props . download as unknown )
22+ }
1723 />
1824 )
1925}
Original file line number Diff line number Diff line change @@ -113,7 +113,9 @@ const VersionsNav_ = () => {
113113 }
114114
115115 if ( versionsBase == null ) {
116- navList . push ( { text : version , items : [ ] } )
116+ if ( version ) {
117+ navList . push ( { text : version , items : [ ] } )
118+ }
117119 } else {
118120 const versionItems : NavItem [ ] = versions . map ( ( v ) => ( {
119121 text : v ,
You can’t perform that action at this time.
0 commit comments