mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +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