From 8821eaf4a1a11faf0e4b65a68b66861bd09beb7f Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Fri, 27 Jun 2025 13:09:22 +0300 Subject: [PATCH 1/2] fix(Video): right click menu crash --- src/components/Video/Video.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/Video/Video.js b/src/components/Video/Video.js index 217db1f2b..eadd9c22e 100644 --- a/src/components/Video/Video.js +++ b/src/components/Video/Video.js @@ -68,10 +68,27 @@ const Video = React.forwardRef(({ className, id, title, thumbnail, season, episo } } }, [deepLinks]); - const renderLabel = React.useMemo(() => function renderLabel({ className, id, title, thumbnail, episode, released, upcoming, watched, progress, scheduled, children, ...props }) { + const renderLabel = React.useMemo(() => function renderLabel({ className, id, title, thumbnail, episode, released, upcoming, watched, progress, scheduled, children, ref: popupRef, ...props }) { const blurThumbnail = profile.settings.hideSpoilers && season && episode && !watched; + const handleRef = React.useCallback((node) => { + if (popupRef) { + if (typeof popupRef === 'function') { + popupRef(node); + } else { + popupRef.current = node; + } + } + if (ref) { + if (typeof ref === 'function') { + ref(node); + } else { + ref.current = node; + } + } + }, [popupRef]); + return ( -