fix: disallow addition of empty tags (#99)

This commit is contained in:
Muhammad Ali
2020-03-07 19:52:52 +05:00
committed by GitHub
parent 74427f3c39
commit 0dbd7557a7

View File

@@ -139,6 +139,10 @@ const Properties = props => {
event.key === ","
) {
const value = event.target.value;
if (value.trim().length === 0) {
event.target.value = "";
return;
}
setTag(value.trim().replace(",", ""));
event.target.value = "";
}