fix: update types for cursor and toRemove

This commit is contained in:
Linus Rath
2026-05-12 16:04:46 +02:00
parent f9f8af2f11
commit ce2731cd9d
+3 -3
View File
@@ -404,12 +404,12 @@ export function EmailComposer({
// Remove the existing signature range [startEl … endEl] inclusive, or
// from startEl to the next blockquote if no end marker is present.
const removeUntil = endEl && endEl.parentNode === parent ? endEl : null;
let cursor: ChildNode | null = startEl;
const toRemove: ChildNode[] = [];
const toRemove: Node[] = [];
let cursor: Node | null = startEl;
while (cursor) {
toRemove.push(cursor);
if (cursor === removeUntil) break;
const next: ChildNode | null = cursor.nextSibling;
const next: Node | null = cursor.nextSibling;
if (!removeUntil && next && (next as Element).tagName === 'BLOCKQUOTE') break;
cursor = next;
}