Skip to content

Commit

Permalink
One less temporary variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed Jul 23, 2020
1 parent 5d1db9a commit 43fb27f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/editor/src/components/post-format/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
},
[]
Expand Down

0 comments on commit 43fb27f

Please sign in to comment.