Skip to content

Commit cf62e72

Browse files
committed
fix: resolve critical XSS vulnerabilities and code quality issues
1 parent af9c758 commit cf62e72

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/editor/extensions/TableOfContents.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Node, mergeAttributes } from '@tiptap/core';
1+
import { Node as ProseMirrorNode, mergeAttributes } from '@tiptap/core';
22
import { ReactNodeViewRenderer } from '@tiptap/react';
33
import { NodeViewWrapper } from '@tiptap/react';
44
import type { Editor } from '@tiptap/react';
@@ -56,8 +56,7 @@ const TableOfContentsComponent = ({
5656
(index: number) => {
5757
let currentIndex = 0;
5858

59-
editor.state.doc.descendants((node: any, pos: number) => {
60-
// eslint-disable-line @typescript-eslint/no-explicit-any
59+
editor.state.doc.descendants((node: ProseMirrorNode, pos: number) => {
6160
if (node.type.name === 'heading') {
6261
if (currentIndex === index) {
6362
editor.commands.focus();

0 commit comments

Comments
 (0)