Frontmatter
| id | 8610 |
| title | Fix crash in Container insert when layout is null |
| state | Closed |
| labels | bugaicore |
| assignees | tobiu |
| createdAt | Jan 13, 2026, 7:37 PM |
| updatedAt | Jan 13, 2026, 7:38 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8610 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 13, 2026, 7:38 PM |
Fix crash in Container insert when layout is null

tobiu
Jan 13, 2026, 7:37 PM
Input from Gemini 3 Pro:
✦ Fixed the crash by using optional chaining
me.layout?.applyChildAttributes(...). Verified via component tests thatmoveComponentno longer throws this error.
tobiu closed this issue on Jan 13, 2026, 7:38 PM
tobiu assigned to @tobiu on Jan 13, 2026, 7:38 PM
Fixes a
TypeError: Cannot read properties of null (reading 'applyChildAttributes')inNeo.container.Base.insert. This occurs when a container (likeNeo.container.Fragment) explicitly setslayout: nullbutinsertattempts to callme.layout.applyChildAttributes.Fix: Use optional chaining
me.layout?.applyChildAttributes(...).