-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I've noticed that when using the hierarchical table module, the app crashes (showing a greyed-out screen) if a user clicks on a cell that contains no patients for a given event. This seems to happen when the subj_ids object is either NULL or empty.
A simple fix is to add a guard clause after the subj_ids assignment (line 610) to prevent further processing when there's no data:
subj_ids <- et()[["df"]][[col]][[row]][["subjid"]]
if (is.null(subj_ids) || length(subj_ids) == 0) return() # <-- new line added
id_elements <- vector(mode = "list", length = (length(subj_ids) * 2) - 1)
This change prevents the crash and has been tested on my local copy of the repository. However, due to company security policy, I'm unable to push the fix myself. Please feel free to implement it on your end.
Thanks!