Plan views crash when sourceMap names missing data keys
Author: soroush5Created Sep 4, 2026Updated Sep 4, 2026
Summary
Plan, Timelist, and Timeline views crash with an uncaught TypeError when the sourceMap names keys that don't exist in the data (e.g. a typo in the inspector mapping, or an upstream schema change after the mapping was saved):
getValidatedData:json[sourceMap.activities].forEach→TypeError: Cannot read properties of undefined (reading 'forEach')getValidatedGroups:groups.lengthwheregroups = json[sourceMap.orderedGroups]isundefined→TypeError ... (reading 'length')
Verified by running the exact function logic in node for both scenarios. All three callers (PlanView.vue, TimelistComponent.vue, TimelineViewLayout.vue) call these directly with no guard, so one stale mapping kills the whole view.
Expected
Treat a mapping that points at missing/non-array data as "no mappable data" (empty plan / fall back to plan-data keys) instead of throwing — the same graceful degradation getObjectJson already applies to unparseable file bodies.
Source: nasa/openmct