Filter empty strings in <FontInput/>

This commit is contained in:
orangemug 2019-06-21 08:05:09 +01:00
parent a066710bfb
commit db9ad86ac2

View file

@ -30,7 +30,10 @@ class FontInput extends React.Component {
changeFont(idx, newValue) {
const changedValues = this.values.slice(0)
changedValues[idx] = newValue
const filteredValues = changedValues.filter(v => v !== undefined);
const filteredValues = changedValues
.filter(v => v !== undefined)
.filter(v => v !== "")
this.props.onChange(filteredValues);
}