You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #749. The link tier knows things it refuses to tell the caller.
Return the resolved target on LinkProps. jahia.com needs it for a label fallback and could not get it, so it hand-wrote the reference read.
Export the safe reference reader.resolveContentLink has a private readReference — a try/catch around getProperty().getValue().getNode() — and it is the thing that stops a dangling reference from throwing. It is exactly what every module needs and it is not exported. jahia.com re-wrote it in 8 lines in NavBar.tsx.
Consider making it a first-class library export next to getNodeProps: reading a reference safely is not a link concern, it is a JCR concern. Any view touching a weakreference has the same problem, because an unresolvable reference reaches JavaScript as a plain falsy value with no way to tell "unset" from "unpublished" from "forbidden".
Part of #749. The link tier knows things it refuses to tell the caller.
LinkProps. jahia.com needs it for a label fallback and could not get it, so it hand-wrote the reference read.resolveContentLinkhas a privatereadReference— a try/catch aroundgetProperty().getValue().getNode()— and it is the thing that stops a dangling reference from throwing. It is exactly what every module needs and it is not exported. jahia.com re-wrote it in 8 lines inNavBar.tsx.getNodeProps: reading a reference safely is not a link concern, it is a JCR concern. Any view touching aweakreferencehas the same problem, because an unresolvable reference reaches JavaScript as a plain falsy value with no way to tell "unset" from "unpublished" from "forbidden".