The error is only a printscreen. You can click the error message and check which line has problems.
From what I can see any variable you should typecheck each variable that deals with a query selector. I can only guess that some of those elements are not always on screen.
Also as a tip you should name anything that is an array with something meaningful, in your case 'messages' should be called 'messageElement' or something while 'message' should be 'messages' or 'messageArray' since the queryAll should return an array.
The error is only a printscreen. You can click the error message and check which line has problems.
From what I can see any variable you should typecheck each variable that deals with a query selector. I can only guess that some of those elements are not always on screen.
Also as a tip you should name anything that is an array with something meaningful, in your case 'messages' should be called 'messageElement' or something while 'message' should be 'messages' or 'messageArray' since the queryAll should return an array.
//here the line of error but i don't understand why error show
//just check this image bro
dev-to-uploads.s3.amazonaws.com/up...
I checked the code
The problem is that you use querySlectorAll ehich returns an array, while the textContent can be used only on an element
Thanks men!