Skip to content

Commit

Permalink
fix: replaced case dive with default
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul-ku-Mo authored and surajair committed Nov 3, 2024
1 parent 207b219 commit eb167e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/import-html/html-to-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ const getBlockProps = (node: Node): Record<string, any> => {
return { _type: "TableBody" };
case "tfoot":
return { _type: "TableFooter" };
case "div": {

default: {
const type = get(node, "children", []).length > 0 ? "Box" : "EmptyBox";
return {
_type: type,
Expand Down Expand Up @@ -398,8 +399,6 @@ const traverseNodes = (nodes: Node[], parent: any = null): ChaiBlock[] => {
return [] as any;
}

console.log(block);

const children = traverseNodes(node.children, { block, node });
return [block, ...children] as ChaiBlock[];
});
Expand Down

0 comments on commit eb167e3

Please sign in to comment.