Merge pull request #1340 from mirumee/SALEOR-2907/3.0/prevent-white-space-only-channel-names (#1348)

Add condition for minimal channel name length
This commit is contained in:
SektorDV 2021-08-31 14:33:45 +02:00 committed by GitHub
parent fac714e415
commit 9329277268
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,7 +144,11 @@ export const ChannelDetailsPage: React.FC<ChannelDetailsPageProps> = ({
);
};
const formDisabled = !data.name || !data.slug || !data.currencyCode;
const formDisabled =
!data.name ||
!data.slug ||
!data.currencyCode ||
!(data.name.trim().length > 0);
return (
<>