fix bug rendering content references in profiles

This commit is contained in:
Grahame Grieve 2020-05-29 15:06:45 +10:00
parent a3d60843e4
commit c4185492a5
1 changed files with 9 additions and 3 deletions

View File

@ -3148,10 +3148,16 @@ public class ProfileUtilities extends TranslatingUtilities {
private ElementDefinition getElementByName(List<ElementDefinition> elements, String contentReference) {
for (ElementDefinition ed : elements)
if (ed.hasSliceName() && ("#"+ed.getSliceName()).equals(contentReference))
for (ElementDefinition ed : elements) {
if (("#"+ed.getPath()).equals(contentReference)) {
return ed;
return null;
}
if (("#"+ed.getId()).equals(contentReference)) {
return ed;
}
}
throw new Error("getElementByName: can't find "+contentReference+"in "+elements.toString());
// return null;
}
private ElementDefinition getElementById(List<ElementDefinition> elements, String contentReference) {