Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'value' of null #491

Closed
gertqin opened this issue Feb 16, 2021 · 4 comments
Closed

Uncaught TypeError: Cannot read property 'value' of null #491

gertqin opened this issue Feb 16, 2021 · 4 comments

Comments

@gertqin
Copy link

gertqin commented Feb 16, 2021

This seems to be the same as #460 but we still experience the error in 0.9.14.
Screenshot 2021-02-16 201543

I've tried to reproduce the error in a small example app, but unfortunately I couldn't :( (and I cannot share our real app). Then I tried to debug what caused the problem, and so far I've discovered that before the error occurs, a node is added to the DoubleLinkedList which has a sibling with the __ln property, but the linked list is empty (i.e. head is null).

Screenshot 2021-02-16 203726

I don't know how that can happen - my only guess is that somehow the DOM reuses a node added in an earlier processMutation cycle. Can you guess what is happening from these screenshots? Or can you tell me what else you would like me to debug, in order to find the cause of the problem?

@guillaume-ro-fr
Copy link

I have the same problem with Angular and ng-select when the selector was empty and a selection is made.

@Yuyz0112
Copy link
Member

@guillaume-ro-fr Do you have any reproducible code or URL?

@jeffxenog
Copy link

当遇到想要在头部前插入一个节点的时候,下面的代码会造成head指针不正确,current是null

} else if (n.nextSibling && isNodeInLinkedList(n.nextSibling)) {

const current = n.nextSibling.__ln.previous;

是否应该要增加判断n.nextSibling.__ln.previous存在

else if (n.nextSibling && isNodeInLinkedList(n.nextSibling) && n.nextSibling.__ln.previous ) {

@Yuyz0112
Copy link
Member

@jeffxenog 是的,这里看起来是有问题的,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants