"articles" are always an array

This commit is contained in:
2021-03-11 14:58:24 +11:00
parent 8f3ab27106
commit 9b6c5af09d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ const NewsEditor = props => {
<div>
<label htmlFor='article'>Article: </label>
<Select
options={(articles).map(article => { return { label: article.title, value: article.index }; })}
options={articles.map(article => { return { label: article.title, value: article.index }; })}
onChange={async values => {
//fetch this article
const index = values[0].value;