fix for index out of bounds error

This commit is contained in:
Grahame Grieve 2023-10-20 16:25:27 +11:00
parent 12cdccf3bb
commit 20929abc58
1 changed files with 3 additions and 0 deletions

View File

@ -2356,6 +2356,9 @@ public class ProfileUtilities extends TranslatingUtilities {
}
}
if (profile != null) {
if (profile.getSnapshot().getElement().isEmpty()) {
throw new DefinitionException(context.formatMessage(I18nConstants.SNAPSHOT_IS_EMPTY, profile.getVersionedUrl()));
}
ElementDefinition e = profile.getSnapshot().getElement().get(0);
String webroot = profile.getUserString("webroot");