diff --git a/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx b/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx index 8964121c57..34b35088fc 100644 --- a/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx @@ -15,6 +15,7 @@ import { selectComposeSuggestion, } from 'flavours/glitch/actions/compose'; import AutosuggestInput from 'flavours/glitch/components/autosuggest_input'; +import { pollLimits } from 'flavours/glitch/initial_state'; const messages = defineMessages({ option_placeholder: { id: 'compose_form.poll.option_placeholder', defaultMessage: 'Option {number}' }, @@ -83,7 +84,7 @@ const Option = ({ multipleChoice, index, title, autoFocus }) => { state.updateIn(['poll', 'options'], if (tmp.size === 0) { return tmp.push('').push(''); - } else if (tmp.size < 4) { + } else if (tmp.size < pollLimits.max_options) { return tmp.push(''); }