mirror of
https://github.com/maputnik/editor.git
synced 2025-12-06 06:10:00 +00:00
Filter empty strings in <FontInput/>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user