From 8b7b97ef09f9bef606dceaa0af360305d8212f69 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 28 Feb 2024 08:40:11 +0000 Subject: [PATCH] fix: error in recording playlist if duration filters are undefined (#20591) * fix: duration filter can be undefined * so don't let it be --- .../filters/AdvancedSessionRecordingsFilters.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/scenes/session-recordings/filters/AdvancedSessionRecordingsFilters.tsx b/frontend/src/scenes/session-recordings/filters/AdvancedSessionRecordingsFilters.tsx index 0f236eb3d4585..313672a10280a 100644 --- a/frontend/src/scenes/session-recordings/filters/AdvancedSessionRecordingsFilters.tsx +++ b/frontend/src/scenes/session-recordings/filters/AdvancedSessionRecordingsFilters.tsx @@ -7,9 +7,10 @@ import { LemonLabel } from 'lib/lemon-ui/LemonLabel/LemonLabel' import { ActionFilter } from 'scenes/insights/filters/ActionFilter/ActionFilter' import { MathAvailability } from 'scenes/insights/filters/ActionFilter/ActionFilterRow/ActionFilterRow' import { TestAccountFilter } from 'scenes/insights/filters/TestAccountFilter' +import { defaultRecordingDurationFilter } from 'scenes/session-recordings/playlist/sessionRecordingsPlaylistLogic' import { groupsModel } from '~/models/groupsModel' -import { EntityTypes, FilterableLogLevel, RecordingDurationFilter, RecordingFilters } from '~/types' +import { EntityTypes, FilterableLogLevel, RecordingFilters } from '~/types' import { DurationFilter } from './DurationFilter' @@ -107,7 +108,7 @@ export const AdvancedSessionRecordingsFilters = ({ duration_type_filter: newDurationType, }) }} - recordingDurationFilter={filters.session_recording_duration as RecordingDurationFilter} + recordingDurationFilter={filters.session_recording_duration || defaultRecordingDurationFilter} durationTypeFilter={filters.duration_type_filter || 'duration'} pageKey="session-recordings" />