[PlayerPanel] showNm null error
This commit is contained in:
@@ -56,15 +56,19 @@ export default function PlayerOverlayContents({
|
||||
setIsSubtitleActive((prev) => !prev);
|
||||
};
|
||||
|
||||
const getPartnerInfo = (key) => {
|
||||
if (playListInfo) {
|
||||
if (key !== "patncLogoPath" && type === "MEDIA") {
|
||||
return;
|
||||
const getPartnerInfo = useCallback(
|
||||
(key) => {
|
||||
if (playListInfo) {
|
||||
if (key !== "patncLogoPath" && type === "MEDIA") {
|
||||
return;
|
||||
}
|
||||
return playListInfo[selectedIndex]?.[key];
|
||||
}
|
||||
return playListInfo[selectedIndex]?.[key];
|
||||
}
|
||||
return panelInfo?.[key];
|
||||
};
|
||||
return panelInfo?.[key];
|
||||
},
|
||||
[playListInfo, type]
|
||||
);
|
||||
|
||||
const patncLogoPath = useMemo(
|
||||
() => getPartnerInfo("patncLogoPath"),
|
||||
[playListInfo, selectedIndex, panelInfo]
|
||||
@@ -77,7 +81,7 @@ export default function PlayerOverlayContents({
|
||||
|
||||
const showName = useMemo(() => {
|
||||
const name = getPartnerInfo("showNm");
|
||||
return name.replace(/<br\s*\/?>/gi, " ");
|
||||
return name ? name.replace(/<br\s*\/?>/gi, " ") : "";
|
||||
}, [playListInfo, selectedIndex, panelInfo]);
|
||||
|
||||
const onSpotlightMoveTabButton = (e) => {
|
||||
|
||||
Reference in New Issue
Block a user