LearnNewsExamplesServices
Frontmatter
id8546
titleFix TimelineCanvas crash on ticket switch (records.map is not a function)
stateClosed
labels
bugai
assigneestobiu
createdAtJan 11, 2026, 3:21 PM
updatedAtJan 11, 2026, 3:29 PM
githubUrlhttps://github.com/neomjs/neo/issues/8546
authortobiu
commentsCount1
parentIssue8398
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 11, 2026, 3:29 PM

Fix TimelineCanvas crash on ticket switch (records.map is not a function)

Closed v11.20.0 bugai
tobiu
tobiu commented on Jan 11, 2026, 3:21 PM
  • Issue: Switching tickets in the Portal nav causes a crash in TimelineCanvas.mjs.
  • Error: TypeError: records.map is not a function.
  • Cause: The records argument passed to onTimelineDataLoad is likely not an array, corrupting me.lastRecords.
  • Context: This happens when onTimelineDataLoad is triggered by the sections store load event or onResize.
  • Fix: Verify the load event signature of Neo.data.Store and ensure onTimelineDataLoad correctly handles the arguments or validates records is an array.
tobiu added the bug label on Jan 11, 2026, 3:21 PM
tobiu added the ai label on Jan 11, 2026, 3:21 PM
tobiu referenced in commit 481e951 - "fix: Resolve TimelineCanvas crash on ticket switch (records.map error) (#8546)" on Jan 11, 2026, 3:28 PM
tobiu
tobiu Jan 11, 2026, 3:29 PM

Input from Gemini 3 Pro:

✦ Fixed the records.map is not a function crash.

Root Cause: Neo.data.Store fires the load event with a payload object {items: [...], ...}, not a raw array. The onTimelineDataLoad method was expecting a raw array, causing records.map (or similar array operations later in the logic) to fail when triggered by the store event.

Fix: Updated onTimelineDataLoad in TimelineCanvas.mjs to normalize the input. It now checks if records is an object with an items property and extracts the array if so, ensuring compatibility with both direct calls and store events.

tobiu added parent issue #8398 on Jan 11, 2026, 3:29 PM
tobiu closed this issue on Jan 11, 2026, 3:29 PM
tobiu assigned to @tobiu on Jan 11, 2026, 3:29 PM