diff --git a/src/frontend/screens/Library/components/InstallModal/index.tsx b/src/frontend/screens/Library/components/InstallModal/index.tsx index 6d9c46e9d..8519c964b 100644 --- a/src/frontend/screens/Library/components/InstallModal/index.tsx +++ b/src/frontend/screens/Library/components/InstallModal/index.tsx @@ -54,12 +54,9 @@ export default React.memo(function InstallModal({ const [crossoverBottle, setCrossoverBottle] = useState('') const [accessCode, setAccessCode] = useState('') - const numberOfChannels = - (gameInfo?.channels && Object.keys(gameInfo?.channels).length) ?? 0 - const initChannelName = - gameInfo?.channels && numberOfChannels > 0 - ? Object.keys(gameInfo?.channels)[0] - : 'main' + const channelKeys = Object.keys(gameInfo?.channels || {}) + const numberOfChannels = channelKeys.length + const initChannelName = numberOfChannels > 0 ? channelKeys[0] : 'main' const [channelNameToInstall, setChannelNameToInstall] = useState(initChannelName) @@ -321,7 +318,8 @@ export default React.memo(function InstallModal({ gameInfo={gameInfo} /> ) : null} - {accessCode && accessCodeContent} + {selectedChannel?.license_config.access_codes && + accessCodeContent} {hasWine ? (