Skip to content

Commit

Permalink
fix: if href is an object we can still playback (#27084)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
pauldambra and github-actions[bot] authored Dec 19, 2024
1 parent bf8416f commit 3843cc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion frontend/src/scenes/session-recordings/player/PlayerMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CopyToClipboardInline } from 'lib/components/CopyToClipboard'
import { useResizeBreakpoints } from 'lib/hooks/useResizeObserver'
import { LemonSkeleton } from 'lib/lemon-ui/LemonSkeleton'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import { percentage } from 'lib/utils'
import { isObject, percentage } from 'lib/utils'
import { DraggableToNotebook } from 'scenes/notebooks/AddToNotebook/DraggableToNotebook'
import { IconWindow } from 'scenes/session-recordings/player/icons'
import { PlayerMetaLinks } from 'scenes/session-recordings/player/PlayerMetaLinks'
Expand All @@ -20,6 +20,12 @@ import { Logo } from '~/toolbar/assets/Logo'
import { sessionRecordingPlayerLogic, SessionRecordingPlayerMode } from './sessionRecordingPlayerLogic'

function URLOrScreen({ lastUrl }: { lastUrl: string | undefined }): JSX.Element | null {
if (isObject(lastUrl) && 'href' in lastUrl) {
// regression protection, we saw a user whose site was sometimes sending the string-ified location object
// this is a best-effort attempt to show the href in that case
lastUrl = lastUrl['href'] as string | undefined
}

if (!lastUrl) {
return null
}
Expand Down

0 comments on commit 3843cc0

Please sign in to comment.