Skip to content

Commit

Permalink
feat: update selected match util (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran McDade authored and Fran McDade committed Aug 19, 2024
1 parent 2cf0932 commit 55bf412
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/components/Layout/components/Header/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,9 @@ function getSelectedMatch(
function getSelectMatchValue(
selectedMatchValue?: boolean | SELECTED_MATCH
): SELECTED_MATCH | undefined {
switch (selectedMatchValue) {
case false:
return undefined;
case true:
return SELECTED_MATCH.STARTS_WITH;
default:
return selectedMatchValue;
}
if (selectedMatchValue === false) return undefined;
if (selectedMatchValue === true) return SELECTED_MATCH.STARTS_WITH;
return selectedMatchValue || SELECTED_MATCH.STARTS_WITH;
}

/**
Expand Down

0 comments on commit 55bf412

Please sign in to comment.