Related data error on null handling - Uncaught TypeError: Cannot read properties of null (reading 'length')

Feature(s) impacted

displaying of related data array

Observed behavior

when handling null values, system stuck

Expected behavior

displaying of related data array

Failure Logs

no error on forest log, browser console returns:
Uncaught TypeError: Cannot read properties of null (reading ‘length’)

Context

  • Project name: WescoverContentAdmin
  • Team name: Content Admin
  • Environment name: Development | nimrodmaltz
  • Agent type & version: “forest-express-mongoose”: “8.7.6”
  • Recent changes made on your end if any: none

we have more than one system using the database and another system provides null when an array is empty and the browser console returns an error and the ui doesnt display anything on the related data section.
so basically if the array is empty, it should be by default: [ ]

thanks,
nimrod

Hello @nmz,

Thanks for reaching out :raised_hands:

I can reproduce your issue on my side.

I’m just wondering: why can’t you fix this on your side?
I guess a fix on our side would be doable, but it would even make more sense that you send an empty array for the relationship, don’t you think? What does prevent you to do so?

Thanks.

hello, @anon34731316 ,

we are trying to build all our systems with tolerance to data exceptions. we fixed it on our side of course but we think it should be handled correctly on Forest

kind regards,
nimrod