Skip to content

Commit 828e30a

Browse files
authored
chore: log heading missing url error on dev only (#6280)
1 parent 2ab8334 commit 828e30a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/components/Layout/Toc.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ export function Toc({headings}: {headings: Toc}) {
2727
<ul className="space-y-2 pb-16">
2828
{headings.length > 0 &&
2929
headings.map((h, i) => {
30-
if (h.url == null) {
31-
// TODO: only log in DEV
30+
if (!h.url && process.env.NODE_ENV === 'development') {
3231
console.error('Heading does not have URL');
3332
}
3433
return (

0 commit comments

Comments
 (0)