From af03b010a4b5fcb74adab8e11f74cacf659f7585 Mon Sep 17 00:00:00 2001 From: orangemug Date: Mon, 13 Apr 2020 08:53:33 +0100 Subject: [PATCH] Fixed default values for --- src/components/inputs/FontInput.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/inputs/FontInput.jsx b/src/components/inputs/FontInput.jsx index 66983d3..3b17825 100644 --- a/src/components/inputs/FontInput.jsx +++ b/src/components/inputs/FontInput.jsx @@ -4,7 +4,7 @@ import AutocompleteInput from './AutocompleteInput' class FontInput extends React.Component { static propTypes = { - value: PropTypes.array.isRequired, + value: PropTypes.array, default: PropTypes.array, fonts: PropTypes.array, style: PropTypes.object, @@ -16,7 +16,7 @@ class FontInput extends React.Component { } 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 if (out[out.length-1] !== ""){