Skip to content

Conversation

Vamsiindugu
Copy link

Description

Bug Fix: DEA crash on subject profile tab (closes #1542)

This pull request addresses the bug where the application crashes when a user navigates to the profile tab for a specific subject, as described in issue #1542.

Root Cause

The crash was caused by a data inconsistency for one of the subject's relatives. The subjectType object for this relative was either incomplete or missing essential properties, such as type or name. The GridCommonList.jsx component's filter, which is responsible for rendering the list of relatives, was not robust enough to catch this invalid data. As a result, an incomplete subjectType object was passed to the SubjectProfilePicture component, causing it to crash when it attempted to access subjectType.type.

Solution

To fix this, I have enhanced the filtering logic in GridCommonList.jsx. The filter now includes an additional check to ensure that the subjectType object and its required properties (type and name) exist before a relative is rendered.

- relative.individualB.subjectType.type
+ relative.individualB.subjectType.type &&
+ relative.individualB.subjectType.name

@Vamsiindugu
Copy link
Author

@ombhardwajj

Hi Bhardwajj,

I've submitted a pull request (#1544) that addresses this issue.

The fix involves strengthening the filter in GridCommonList.jsx to handle cases where a subject's relative has an incomplete subjectType object. This change should prevent the application from crashing on the profile tab.

Could you please take a look when you have a moment? Any feedback is appreciated.

Thank you!

@Vamsiindugu
Copy link
Author

@ombhardwajj

Hi Bhardwajj,

I've submitted a pull request (#1544) to fix the issue where the application crashes on the profile tab.

The bug occurred when a subject's relative had an incomplete subjectType object. The fix strengthens the filter in GridCommonList.jsx to handle these cases more gracefully, preventing the crash.

Please let me know if you have any feedback when you get a chance to review it.

Thanks!

@Vamsiindugu
Copy link
Author

Hi @ombhardwajj , just following up on this PR. Let me know if you've had a chance to look at it or if you need any more info from my end. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in DEA

1 participant