fix: fix page broken for undefined permission (#19972)

This commit is contained in:
Good Wood 2025-05-20 14:41:10 +08:00 committed by GitHub
parent d186daa131
commit 09547b4c8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,8 +49,8 @@ const PluginSettingModal: FC<Props> = ({
</div>
<div className='flex flex-col items-start justify-center gap-4 self-stretch px-6 py-3'>
{[
{ title: t(`${i18nPrefix}.whoCanInstall`), key: 'install_permission', value: tempPrivilege.install_permission },
{ title: t(`${i18nPrefix}.whoCanDebug`), key: 'debug_permission', value: tempPrivilege.debug_permission },
{ title: t(`${i18nPrefix}.whoCanInstall`), key: 'install_permission', value: tempPrivilege?.install_permission || PermissionType.noOne },
{ title: t(`${i18nPrefix}.whoCanDebug`), key: 'debug_permission', value: tempPrivilege?.debug_permission || PermissionType.noOne },
].map(({ title, key, value }) => (
<div key={key} className='flex flex-col items-start gap-1 self-stretch'>
<div className='flex h-6 items-center gap-0.5'>