mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 08:35:25 +01:00
Fixed default values for <FontInput/>
This commit is contained in:
parent
0858a16ffc
commit
af03b010a4
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ import AutocompleteInput from './AutocompleteInput'
|
||||||
|
|
||||||
class FontInput extends React.Component {
|
class FontInput extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
value: PropTypes.array.isRequired,
|
value: PropTypes.array,
|
||||||
default: PropTypes.array,
|
default: PropTypes.array,
|
||||||
fonts: PropTypes.array,
|
fonts: PropTypes.array,
|
||||||
style: PropTypes.object,
|
style: PropTypes.object,
|
||||||
|
@ -16,7 +16,7 @@ class FontInput extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
get values() {
|
get values() {
|
||||||
const out = this.props.value || this.props.default.slice(1) || [""];
|
const out = this.props.value || this.props.default || [];
|
||||||
|
|
||||||
// Always put a "" in the last field to you can keep adding entries
|
// Always put a "" in the last field to you can keep adding entries
|
||||||
if (out[out.length-1] !== ""){
|
if (out[out.length-1] !== ""){
|
||||||
|
|
Loading…
Reference in a new issue