diff --git a/B05_Profile/B05_Profile_Api_Fetch.ts b/B05_Profile/B05_Profile_Api_Fetch.ts index bd32c576d..653b11c7e 100644 --- a/B05_Profile/B05_Profile_Api_Fetch.ts +++ b/B05_Profile/B05_Profile_Api_Fetch.ts @@ -323,9 +323,9 @@ export async function flushRouteParts(projectId: string): Promise { readRouteLatestCache(projectId) ?? (await fetchLatestRoute(projectId).catch(() => null)); const surface = await fetchConfirmedSurface(projectId).catch(() => null); await saveRouteParts(projectId, { - filter_key: latest?.surface_params.source_filter, - method: latest?.surface_params.method, - smooth: latest?.surface_params.smooth, + filter_key: latest?.surface_params?.source_filter, + method: latest?.surface_params?.method, + smooth: latest?.surface_params?.smooth, surface_model_id: surface?.model_id ?? undefined, irregular_stations: [], uphill_overrides: uphillOverridesOf(projectId), diff --git a/B05_Profile/B05_Profile_UI_Page_Latest.ts b/B05_Profile/B05_Profile_UI_Page_Latest.ts index 0e2f6c9dc..348e18adb 100644 --- a/B05_Profile/B05_Profile_UI_Page_Latest.ts +++ b/B05_Profile/B05_Profile_UI_Page_Latest.ts @@ -40,9 +40,9 @@ export function createLatestSource(projectId: string) { [ value.route?.id ?? "", value.route?.surface_model_id ?? "", - value.surface_params.source_filter, - value.surface_params.method, - String(value.surface_params.smooth), + value.surface_params?.source_filter, + value.surface_params?.method, + String(value.surface_params?.smooth), ].join("|"); /** @@ -72,7 +72,7 @@ export function panelValuesOf(next: RouteLatestResponse): Partial