mirror of
https://github.com/maputnik/editor.git
synced 2026-06-23 23:57:27 +00:00
Filter empty strings in <FontInput/>
This commit is contained in:
@@ -30,7 +30,10 @@ class FontInput extends React.Component {
|
|||||||
changeFont(idx, newValue) {
|
changeFont(idx, newValue) {
|
||||||
const changedValues = this.values.slice(0)
|
const changedValues = this.values.slice(0)
|
||||||
changedValues[idx] = newValue
|
changedValues[idx] = newValue
|
||||||
const filteredValues = changedValues.filter(v => v !== undefined);
|
const filteredValues = changedValues
|
||||||
|
.filter(v => v !== undefined)
|
||||||
|
.filter(v => v !== "")
|
||||||
|
|
||||||
this.props.onChange(filteredValues);
|
this.props.onChange(filteredValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user