mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
type(formItemLabel): remove unnecessary assert (#49797)
* type(formItemLabel): remove unnecessary assert * Update components/form/FormItemLabel.tsx Co-authored-by: lijianan <574980606@qq.com> Signed-off-by: thinkasany <480968828@qq.com> --------- Signed-off-by: thinkasany <480968828@qq.com> Co-authored-by: lijianan <574980606@qq.com>
This commit is contained in:
parent
e666f50878
commit
4c18036774
@ -93,8 +93,8 @@ const FormItemLabel: React.FC<FormItemLabelProps & { required?: boolean; prefixC
|
||||
const haveColon = computedColon && !vertical;
|
||||
|
||||
// Remove duplicated user input colon
|
||||
if (haveColon && typeof label === 'string' && (label as string).trim() !== '') {
|
||||
labelChildren = (label as string).replace(/[:|:]\s*$/, '');
|
||||
if (haveColon && typeof label === 'string' && label.trim()) {
|
||||
labelChildren = label.replace(/[:|:]\s*$/, '');
|
||||
}
|
||||
|
||||
// Tooltip
|
||||
|
Loading…
Reference in New Issue
Block a user