Skip to content

Commit c50be0a

Browse files
committed
IPS with only fullUrl in entry array item
1 parent 0e39028 commit c50be0a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib/resources.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,15 @@ export function organizeResources(bundle, labelCounters) {
6060

6161
if (bundle.contentOK() && bundle.fhir.entry) {
6262
for (const i in bundle.fhir.entry) {
63-
63+
6464
const e = bundle.fhir.entry[i];
65-
const r = e.resource;
6665

66+
if (!e.resource) {
67+
console.error("Malformed bundle entry: " + JSON.stringify(e, null, 2));
68+
continue;
69+
}
70+
71+
const r = e.resource;
6772
organized.all.push(r);
6873

6974
organized.byId[e.fullUrl] = r;

0 commit comments

Comments
 (0)