Cannot convert undefined or null to object when leaving page with syncFusion grid control

We have an angular app with syncfusion grids throughout the pages. If I move off a page that has a syncfusion grid control this error appears in the console. The grid works as expected. There is no error when loading the page or using the page. The error only occurs when leaving the page.


"@syncfusion/ej2-angular-grids": "^20.4.51",


ERROR TypeError: Cannot convert undefined or null to object

    at Function.keys (<anonymous>)

    at Base.callChildDataBind (ej2-base.es5.js:5218:27)

    at Base.dataBind (ej2-base.es5.js:5246:14)

    at Component.dataBind (ej2-base.es5.js:7252:35)

    at timer (zone.js:2405:41)

    at _ZoneDelegate.invokeTask (zone.js:406:31)

    at Object.onInvokeTask (core.mjs:26510:33)

    at _ZoneDelegate.invokeTask (zone.js:405:60)

    at Zone.runTask (zone.js:178:47)

    at invokeTask (zone.js:487:34)


What should I do to make sure this no longer occurs?



1 Reply

PS Pavithra Subramaniyam Syncfusion Team June 20, 2023 12:06 PM UTC

Hi Eric,


We have tried to reproduce the issue “script error while routing” at our end, but it is working fine. Please refer to the below sample link for more information.


https://stackblitz.com/edit/angular-vwtcqm-ma2bxt?file=src%2Fapp.component.html


To validate further, could you please share the below details which will be helpful for us to provide a better solution as early as possible?


  1. Share the full Grid code example
  2. Try to check the issue with the latest version
  3. Share an issue-reproducible sample that will be easier to validate.


Regards,

Pavithra S


Loader.
Up arrow icon