Skip to content

Commit

Permalink
Update src/plugins/discover/public/application/angular/discover_state.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Roes <[email protected]>
  • Loading branch information
kertal and timroes authored Apr 20, 2021
1 parent d8bc3da commit 828d75d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export function getState({
appStateFromUrl.query = migrateLegacyQuery(appStateFromUrl.query);
}

if (appStateFromUrl && appStateFromUrl.sort && !appStateFromUrl.sort.length) {
if (appStateFromUrl?.sort && !appStateFromUrl.sort.length) {
// If there's an empty array given in the URL, the sort prop should be removed
// This allows the sort prop to be overwritten with the default sorting
delete appStateFromUrl.sort;
Expand Down

0 comments on commit 828d75d

Please sign in to comment.