-
Notifications
You must be signed in to change notification settings - Fork 118
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
Cannot read property 'parent' #41
Comments
Can you paste a code example or (preferably) a link to a CodePen demonstrating the issue so that I could dig into the problem more deeply? |
You can check this url http://codepen.io/shandy05/pen/EPqeGm, try to reply and reload |
There was a bug indeed when comparing the dates of two comments, this is now fixed in the newest version 1.1.1. The fix was done in: 5a0b13a |
still not working :( |
Now I got it working in codepen after 5d5bed4. Still, I don't understand why it works after this commit, I think there are some issues in your data. For example, there may be a parent comment that has a timestamp later than one of its replies |
ok, thanks for help |
Did you get it working after the latest commit? |
sometimes working, I don't know where is problem |
Unfortunately I don't have time to investigate this issue right now but you can do so if you will. The problem is in sorting the comments at the beginning, line 635:
For some reason the comments are not sorted by date and thus the parent of a certain comment cannot be referenced in the commentsById dictionary. |
ok, i will try to investigate, thanks jjtykkyl :) |
I found the same bug on my own project. Also i figured out that my mistake was I got some comments from server without date and this was the reason, because comments firstly sorted on line 272: I removed all comments without date and it works |
Hello, was this problem resolved? Because i tried everything suggested above, and the problem is still coming. I noticed that when i add more than a certain amount of data.. i deleted all the data and tried again, the same problem..I amended the comments-data.js and added one more comment, and it gives the same problem, can that more than 10 comments causes problems or am I doing something wrong? Thanks! |
Hi everybody! It's been a while since last post here, but I might have a good news for those who still struggle with this strange bug or will in the future. A bit of a workaround... When implementing this plugin, make sure to have Hope this will help someone. |
Hello,
I have a problem, if i use ajax in getComments always appears error Cannot read property 'parent', can you help me?
Thank you.
The text was updated successfully, but these errors were encountered: