mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
fix: erroring table of contents (#27826)
Table of Contents errored in some cases because I forgot to check for the case where the value can be null.
This commit is contained in:
1 parent
0c34787f9e
commit
2f6328ea3c
1 file changed
+1
-1
@@ -99,7 +99,7 @@ const GuidesTableOfContents = ({
|
||||
|
||||
return { text, link, level } as Partial<TOCHeader>
|
||||
})
|
||||
.filter((x): x is TOCHeader => !!x.text && !!x.link && !!x.level)
|
||||
.filter((x): x is TOCHeader => !!x && !!x.text && !!x.link && !!x.level)
|
||||
setTocList(newHeadings)
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user