We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Trying to add the submitted data of a form to the previously saved data : getting error ERROR TypeError: Cannot read property 'Acomment' of null

Goal :
      I was trying to add comment to previous list of comments saved in a data object through a comment form on dishdetail view of dish  from a menu and showing the preview above the form. The submitted comment should be shown as the last add comment visible under "Comments" heading (as the same format as the comments are shown in the list of comments). After this the form must be reset so as to let the user to add more comments.

What I was getting?

 The comment is not visible under the list of comments and the form is also got distorted ( i am adding the screenshots of the distored dishdetail view. On checking the JavaScript console is showing error as ERROR TypeError: Cannot read property 'comment' of null. (Detailed :error document file is attached)


How to fix this error and get the desired working of dishdetailed view ?

Attachment: code_502c01ba.zip

Loader.
Live Chat Icon For mobile
Up arrow icon