-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
None
-
-
Empty show more show less
-
HL & LD 38
-
3
In EditablePage in React templateAnnotations/templateDefinitions can not be null/undefined.
In area addComment is always run
https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/react-editor/src/component/EditableArea/EditableArea.js#37
and openComment is always assigned:
https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/react-editor/src/component/EditableArea/EditableArea.js#62
Meaning this code is run: templateAnnotations[content['@path']
So to make it work we pass templateAnnotations as empty object.
Problem is that in many places in code we can find things like
if (templateAnnotations)
eg: https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/react-editor/src/component/EditablePage/EditablePage.js#58
And in JS if ({}) is true hence this check is not working as it should.
Lets allow passing templateAnnotations/templateDefinitions as null/undefined so all the if against it work
- is related to
-
MGNLFE-135 Only render page annotation when the template annotations is passed
- Closed