Replies: 1 comment
-
|
For anyone wondering what the issue was here, I found the root cause. In some instances, we were accepting custom HTML, parsing it, creating nodes with In our custom parsing step, I added a check to see if any of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there,
I've been really struggling with finding the root cause of this error:
Expected node root to have a parent..It's being triggered by the
getParentOrThrow()on (line 372 ofLexicalListItemNode.ts) where it is trying to find the parentListItemNode's parent. In this case, it seems thatListItemNodeis actually a direct descendant of theRootNode, so trying to findRootNode's parent throws the error. Comically, there's a comment in the source code just above that line:ListItemNode should always have a ListNode for a parent.How can this be? I don't think Lexical would let me add a
ListeItemNodeas a direct descendant ofRootNodeeven if I tried to do it manually.Also, I should add that I'm not sure what action is causing this unfortunately. I'm seeing the error in prod but still haven't been able to reproduce locally.
Open to any and all suggestions on how to diagnose this!
Beta Was this translation helpful? Give feedback.
All reactions