Adrien Denat
fix deepestChild function throwing error (#213)
64263c4 unverified
raw
history blame contribute delete
216 Bytes
export function deepestChild(el: HTMLElement): HTMLElement {
if (el.lastElementChild && el.lastElementChild.nodeType !== Node.TEXT_NODE) {
return deepestChild(el.lastElementChild as HTMLElement);
}
return el;
}