diff --git a/packages/amis/src/renderers/Action.tsx b/packages/amis/src/renderers/Action.tsx index 720a9ed7b84..9c1094f9a41 100644 --- a/packages/amis/src/renderers/Action.tsx +++ b/packages/amis/src/renderers/Action.tsx @@ -789,8 +789,14 @@ export class Action extends React.Component { }) as string; disabled = true; } - const icon = filter(this.props.icon, data); - const rightIcon = filter(this.props.rightIcon, data); + let icon = this.props.icon; + let rightIcon = this.props.rightIcon; + if (typeof icon === 'string') { + icon = filter(this.props.icon, data); + } + if (typeof rightIcon === 'string') { + rightIcon = filter(this.props.rightIcon, data); + } const iconElement = (