diff --git a/tools/doc/html.mjs b/tools/doc/html.mjs
index 168f68c1b03f21..95782efe03d554 100644
--- a/tools/doc/html.mjs
+++ b/tools/doc/html.mjs
@@ -467,7 +467,7 @@ export function buildToc({ filename, apilinks }) {
.use(htmlStringify)
.processSync(toc).toString();
- file.toc = `Table of contents
${inner}