[MGNLFE-119] templateAnnotations/templateDefinitions empty check issue Created: 23/Sep/21 Updated: 15/Oct/21 Resolved: 01/Oct/21 |
|
| Status: | Closed |
| Project: | Magnolia Frontend Helpers |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Bartosz Staryga | Assignee: | Robert Šiška |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | VN-Testing | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 0.5d | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[X]*
Doc/release notes changes? Comment present?
[X]*
Downstream builds green?
[X]*
Solution information and context easily available?
[X]*
Tests
[X]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Epic Link: | Headless p13n | ||||||||
| Sprint: | HL & LD 38 | ||||||||
| Story Points: | 3 | ||||||||
| Description |
|
In EditablePage in React templateAnnotations/templateDefinitions can not be null/undefined. In area addComment is always run and openComment is always assigned: 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 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 |