79439391

Date: 2025-02-14 12:40:27
Score: 0.5
Natty:
Report link

Turns out that i was having a computed property on one of the components that was using a filter to get all the typeA segments that looked like this

content?.elementList[0].segments.filter( x=> x.$type = SegmentType.TypeA)

instead of

content?.elementList[0].segments.filter( x=> x.$type == SegmentType.TypeA)

or

content?.elementList[0].segments.filter( x=> x.$type === SegmentType.TypeA)

I got confused because even if I put my console.log() as soon as I was getting the response the object was still modified by the property mentioned above, and I assumed that it might have been caused by the parsing of the object.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Razvan