From 665d5dcc9e2fac6721a67ed6b1eb77a6ef551a14 Mon Sep 17 00:00:00 2001 From: Mauricio Gelves Date: Wed, 26 Jun 2024 13:19:03 +0200 Subject: [PATCH] Added extra contol on conditional. --- src/components/AuthorsSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AuthorsSelect.tsx b/src/components/AuthorsSelect.tsx index 5c90ae7..071d600 100644 --- a/src/components/AuthorsSelect.tsx +++ b/src/components/AuthorsSelect.tsx @@ -58,7 +58,7 @@ const AuthorsSelect = ( props: AuthorsSelectProps ): ReactElement => { if ( ! selected.length && isEqual( preloadedAuthorIDs, currentAuthorIDs ) ) { setSelected( preloadedAuthorOptions.authors ); - } else if ( currentAuthorIDs.length && ! selected.length ) { + } else if ( currentAuthorIDs !== undefined && currentAuthorIDs.length && ! selected.length ) { const path = addQueryArgs( '/authorship/v1/users/',