mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix: prevent null access error when finding profile items
This commit is contained in:
parent
b10075737f
commit
9863c1a1de
@ -45,7 +45,7 @@ const ProfileCard: React.FC<Props> = (props) => {
|
|||||||
id: 'profile'
|
id: 'profile'
|
||||||
})
|
})
|
||||||
const transform = tf ? { x: tf.x, y: tf.y, scaleX: 1, scaleY: 1 } : null
|
const transform = tf ? { x: tf.x, y: tf.y, scaleX: 1, scaleY: 1 } : null
|
||||||
const info = items?.find((item) => item.id === current) ?? {
|
const info = items?.find((item) => item && item.id === current) ?? {
|
||||||
id: 'default',
|
id: 'default',
|
||||||
type: 'local',
|
type: 'local',
|
||||||
name: t('sider.cards.emptyProfile')
|
name: t('sider.cards.emptyProfile')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user