diff --git a/packages/dataviews/src/view-actions.js b/packages/dataviews/src/view-actions.js index 4d012d4e5a38f..a5330c08f299c 100644 --- a/packages/dataviews/src/view-actions.js +++ b/packages/dataviews/src/view-actions.js @@ -232,22 +232,13 @@ function SortMenu( { fields, view, onChangeView } ) { } onSelect={ ( event ) => { event.preventDefault(); - if ( - sortedDirection === direction - ) { - onChangeView( { - ...view, - sort: undefined, - } ); - } else { - onChangeView( { - ...view, - sort: { - field: field.id, - direction, - }, - } ); - } + onChangeView( { + ...view, + sort: { + field: field.id, + direction, + }, + } ); } } > { info.label }