Skip to content

Commit ef936c7

Browse files
authored
Merge pull request #95 from the-commons-project/develop
Develop to Main
2 parents ffcd2d7 + 8bd772b commit ef936c7

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)