chore(plugins/user-badges): use push + pop instead of unshift + shift

This commit is contained in:
PalmDevs 2025-08-19 21:45:48 +07:00
parent 69fff07c1f
commit 180b8b858d
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -76,7 +76,7 @@ registerPlugin(
!props.badges.length
)
// @ts-expect-error: This will never be rendered
props.badges.unshift({ id: DUMMY_SYMBOL })
props.badges.push({ id: DUMMY_SYMBOL })
return args
}),
@ -138,7 +138,7 @@ function patchProfileBadgeRows(
}
// Remove dummy badge if it exists
if (props.id === DUMMY_SYMBOL) container.props.children.shift()
if (props.id === DUMMY_SYMBOL) container.props.children.pop()
}
return fiber