Skip to content

Commit

Permalink
Remove the yoda condition as it can be harder to read it for some peo…
Browse files Browse the repository at this point in the history
…ple.
  • Loading branch information
anton-vlasenko committed Oct 12, 2021
1 parent a62c907 commit 612d17b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/edit-navigation/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function createMenuPreloadingMiddleware( preloadedData ) {
const menuId = parseInt( matches[ 1 ] );
const menu = menuData.filter( ( { id } ) => id === menuId );

if ( 0 < menu.length ) {
if ( menu.length > 0 ) {
menuDataLoaded = true;
// We don't have headers because we "emulate" this request
return sendSuccessResponse(
Expand Down

0 comments on commit 612d17b

Please sign in to comment.