Skip to content

Commit

Permalink
- AEM: getJcrContentNode() null
Browse files Browse the repository at this point in the history
  • Loading branch information
alegauss committed Feb 3, 2024
1 parent c94d298 commit 1b70610
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class AemObject {
private final String url;
private String model;
private final JSONObject node;
private JSONObject jcrContentNode;
private JSONObject jcrContentNode = new JSONObject();
private String title;
private final Map<String, Object> attributes = new HashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private TurCmsTargetAttrValueList getTargetAttrValueListFromJcrProperty(TurCmsCo
private Object getJcrProperty(TurCmsContext context, String sourceAttrName) {
return Optional.ofNullable(sourceAttrName).map(attrName -> {
AemObject aemObject = (AemObject) context.getCmsObjectInstance();
if (aemObject.getJcrContentNode().has(attrName)) {
if (aemObject.getJcrContentNode() != null && aemObject.getJcrContentNode().has(attrName)) {
return aemObject.getJcrContentNode().get(attrName);
} else if (aemObject.getAttributes().containsKey(attrName))
return aemObject.getAttributes().get(attrName);
Expand Down

0 comments on commit 1b70610

Please sign in to comment.