(items: HTMLElement[], activeCommentId: string | null)
| 1801 | } |
| 1802 | |
| 1803 | function findCommentPosition(items: HTMLElement[], activeCommentId: string | null): number { |
| 1804 | if (items.length === 0) return 0 |
| 1805 | if (!activeCommentId) return 0 |
| 1806 | const exact = items.findIndex((item) => item.dataset.commentId === activeCommentId) |
| 1807 | return exact >= 0 ? exact : 0 |
| 1808 | } |
| 1809 | |
| 1810 | function scrollToCommentElement( |
| 1811 | el: HTMLElement | undefined, |
no outgoing calls
no test coverage detected