File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1343,7 +1343,18 @@ const sidebars = {
13431343 "operations/startup-scripts" ,
13441344 "operations/storing-data" ,
13451345 "operations/allocation-profiling" ,
1346- "operations/backup" ,
1346+ {
1347+ type : "category" ,
1348+ label : "Backup/Restore" ,
1349+ collapsed : true ,
1350+ collapsible : true ,
1351+ items : [
1352+ {
1353+ type : "autogenerated" ,
1354+ dirName : "operations/backup_restore" ,
1355+ }
1356+ ]
1357+ } ,
13471358 "operations/caches" ,
13481359 "operations/workload-scheduling" ,
13491360 "operations/update" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import CodeViewer from "../../components/CodeViewer";
44
55
66function countLines ( text ) {
7+ // Handle undefined or null input
8+ if ( ! text ) return 1 ; // Return 1 as default line count
79 // Split the string by newline characters
810 const lines = text . split ( '\n' ) ;
911 // Return the number of lines
@@ -36,7 +38,7 @@ function parseMetaString(meta = '') {
3638export default function CodeBlockWrapper ( props ) {
3739 const lineHeight = 18.85 ;
3840 const [ isLoaded , setIsLoaded ] = useState ( false ) ;
39- const [ estimatedHeight , setEstimatedHeight ] = useState ( countLines ( props . children ) * lineHeight ) ;
41+ const [ estimatedHeight , setEstimatedHeight ] = useState ( countLines ( props . children || '' ) * lineHeight ) ;
4042 const codeBlockRef = useRef ( null ) ;
4143
4244 const handleIntersection = useCallback ( ( entries ) => {
You can’t perform that action at this time.
0 commit comments