fix: fix list.item actions empty (#49842)

* fix: fix list.item actions empty

Signed-off-by: Cody Chan <int64ago@gmail.com>

* Update components/list/Item.tsx

Signed-off-by: afc163 <afc163@gmail.com>

* Apply suggestions from code review

Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: Cody Chan <int64ago@gmail.com>
Signed-off-by: afc163 <afc163@gmail.com>
Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
Cody Chan 2024-07-12 17:04:08 +08:00 committed by GitHub
parent 85c31f1c43
commit 53b6688b41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -107,7 +107,7 @@ const InternalItem = React.forwardRef<HTMLDivElement, ListItemProps>((props, ref
};
const prefixCls = getPrefixCls('list', customizePrefixCls);
const actionsContent = actions?.length && (
const actionsContent = (actions && actions.length > 0) && (
<ul
className={classNames(`${prefixCls}-item-action`, moduleClass('actions'))}
key="actions"