@eka-care/medical-records-ui 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3566,6 +3566,11 @@ function SmartRecordsViewInner({
3566
3566
  return;
3567
3567
  }
3568
3568
  const orphanRecords = state.records.ids.map((id) => state.records.byId[id]).filter((r) => !!r && r.cases.length === 0);
3569
+ if (visitsStatus === "error" && orphanRecords.length > 0) {
3570
+ didInitRef.current = true;
3571
+ handleSelectCase(UNGROUPED_CASE_ID);
3572
+ return;
3573
+ }
3569
3574
  if (orphanRecords.length > 0) {
3570
3575
  const firstRecord = orphanRecords.reduce(
3571
3576
  (latest, r) => r.createdAtEpoch > latest.createdAtEpoch ? r : latest