Commit bec16662 authored by Grant's avatar Grant
Browse files

remove reference to HTMLElement, it doesn't exist on node

parent 748e29c6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -88,8 +88,8 @@ Turndown.addRule("listItem", {
      .replace(/\n/gm, "\n  "); // indent
    var prefix = options.bulletListMarker + " ";
    var parent = node.parentNode;
    if (parent?.nodeName === "OL" && parent instanceof HTMLElement) {
      var start = parent.getAttribute("start");
    if (parent?.nodeName === "OL") {
      var start = (parent as HTMLElement).getAttribute("start");
      var index = Array.prototype.indexOf.call(parent.children, node);
      prefix = (start ? Number(start) + index : index + 1) + ". ";
    }