Skip to content

Commit

Permalink
Update add_text_node in from_dom.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmikolay authored Jun 10, 2024
1 parent 34c9614 commit bfac67b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prosemirror/model/from_dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def add_text_node(self, dom_: DOMNode) -> None:
re.search(r"^[ \t\r\n\u000c]", value) is not None
and self.open == len(self.nodes) - 1
):
node_before = top.content[-1]
node_before = top.content[-1] if top.content else None
dom_node_before = dom_.getprevious()
if (
node_before is None
Expand Down

0 comments on commit bfac67b

Please sign in to comment.