Skip to content

Commit

Permalink
Merge pull request #95 from the-commons-project/develop
Browse files Browse the repository at this point in the history
Develop to Main
  • Loading branch information
TCPopsadmin authored Aug 26, 2024
2 parents ffcd2d7 + 8bd772b commit ef936c7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ export function organizeResources(bundle, labelCounters) {

if (bundle.contentOK() && bundle.fhir.entry) {
for (const i in bundle.fhir.entry) {

const e = bundle.fhir.entry[i];
const r = e.resource;

if (!e.resource) {
console.error("Malformed bundle entry: " + JSON.stringify(e, null, 2));
continue;
}

const r = e.resource;
organized.all.push(r);

organized.byId[e.fullUrl] = r;
Expand Down

0 comments on commit ef936c7

Please sign in to comment.