[MGNLFE-216] No check if content exists when accessing "content['@path']" Created: 13/Jun/22 Updated: 15/Jul/22 Resolved: 15/Jul/22 |
|
| Status: | Closed |
| Project: | Magnolia Frontend Helpers |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Bartosz Staryga | Assignee: | Rishab Dhar |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| 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: | SPA Editor Backlog | |||||||||||||||||||||||||
| Sprint: | DevX 14 | |||||||||||||||||||||||||
| Story Points: | 3 |
| Description |
|
We should ensure that everywhere in the frontend helpers packages that context exists before accessing "content['@path']" e.g. https://git.magnolia-cms.com/projects/MODULES/repos/frontend-helpers/browse/packages/angular-editor/projects/angular-editor/src/lib/area/editable-area.component.ts#85 It results in JS errors in the consoles of trying to access a property of "undefined". Can we ensure that we have all null validations in place (e.g. optional chaining https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining)? |