diff --git a/packages/editor/src/components/post-format/index.js b/packages/editor/src/components/post-format/index.js index d18844815bbf45..f126fb2aa7d09d 100644 --- a/packages/editor/src/components/post-format/index.js +++ b/packages/editor/src/components/post-format/index.js @@ -52,16 +52,14 @@ export default function PostFormat() { potentialSuggestedFormat !== _currentFormat && supportedFormats.includes( potentialSuggestedFormat ); - const _suggestedFormat = suggestionIsValid - ? potentialSuggestedFormat - : null; - return { currentFormat: _currentFormat, // The current format may not be supported by the theme. // Ensure it is always shown in the select control. listedFormats: union( [ _currentFormat ], supportedFormats ), - suggestedFormat: _suggestedFormat, + suggestedFormat: suggestionIsValid + ? potentialSuggestedFormat + : null, }; }, []