Getting Runtime error : Uncaught (in promise): TypeError: Cannot read property 'rating' of null TypeError: Cannot read property 'rating' of null
Goal
Attachment: error_904cf8fd.zip
I was creating a dishdetailpage of each dish on the menu page of my app , which is opend on clicking the image of each dish .
What I was getting?
When on clicking the image of a dish on menu page , it is opening the dishdetail page with the error as follows --
Runtime Error
Uncaught (in promise): TypeError: Cannot read property 'rating' of null TypeError: Cannot read property 'rating' of null at http://localhost:8100/build/main.js:128:81 at Array.forEach (<anonymous>) at new DishdetailPage (http://localhost:8100/build/main.js:128:28) at createClass (http://localhost:8100/build/vendor.js:12859:20) at createDirectiveInstance (http://localhost:8100/build/vendor.js:12700:37) at createViewNodes (http://localhost:8100/build/vendor.js:14158:53) at createRootView (http://localhost:8100/build/vendor.js:14047:5) at callWithDebugContext (http://localhost:8100/build/vendor.js:15472:42) at Object.debugCreateRootView [as createRootView] (http://localhost:8100/build/vendor.js:14755:12) at ComponentFactory_.create (http://localhost:8100/build/vendor.js:11652:46)
Stack
Error: Uncaught (in promise): TypeError: Cannot read property 'rating' of null
TypeError: Cannot read property 'rating' of null
at http://localhost:8100/build/main.js:128:81
at Array.forEach (<anonymous>)
at new DishdetailPage (http://localhost:8100/build/main.js:128:28)
at createClass (http://localhost:8100/build/vendor.js:12859:20)
at createDirectiveInstance (http://localhost:8100/build/vendor.js:12700:37)
at createViewNodes (http://localhost:8100/build/vendor.js:14158:53)
at createRootView (http://localhost:8100/build/vendor.js:14047:5)
at callWithDebugContext (http://localhost:8100/build/vendor.js:15472:42)
at Object.debugCreateRootView [as createRootView] (http://localhost:8100/build/vendor.js:14755:12)
at ComponentFactory_.create (http://localhost:8100/build/vendor.js:11652:46)
at c (http://localhost:8100/build/polyfills.js:3:19752)
at Object.reject (http://localhost:8100/build/polyfills.js:3:19174)
at NavControllerBase._fireError (http://localhost:8100/build/vendor.js:54636:16)
at NavControllerBase._failed (http://localhost:8100/build/vendor.js:54629:14)
at http://localhost:8100/build/vendor.js:54676:59
at t.invoke (http://localhost:8100/build/polyfills.js:3:14976)
at Object.onInvoke (http://localhost:8100/build/vendor.js:5134:33)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14916)
at r.run (http://localhost:8100/build/polyfills.js:3:10143)
at http://localhost:8100/build/polyfills.js:3:20242
Why am I getting this error and how to fix this?
Attachment: error_904cf8fd.zip
SIGN IN To post a reply.
1 Reply
DL
Deepa Loganathan
Syncfusion Team
March 12, 2019 10:55 AM UTC
Hi Swati,
We have checked the reported issue and the issue would usually occur when you were trying to access the property of an object that is not initialized.
We have checked to see that you have initialized the property “comments” with the navigation parameters and so we suspect the issue was because the navigation parameters were not received properly in the component. So please check to see if there exist any issues in passing navigation parameters in routing to the “dishdetail” page.
Regards,
Deepa L.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
SD Swati Dubey
- Mar 11, 2019 02:30 PM UTC
- Mar 12, 2019 10:55 AM UTC