Skip to content

Commit

Permalink
Use includes instead of strict equality check to allow localized _sor…
Browse files Browse the repository at this point in the history
…tKeyByLang
  • Loading branch information
johanbissemattsson committed Aug 14, 2024
1 parent 9390372 commit 281730e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vue-client/src/components/search/search-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ export default {
prefSort() {
if (
this.$route.query?._sort
&& this.settings.sortOptions[this.activeSearchType]?.find((sortOption) => sortOption.query === this.$route.query._sort)
&& this.settings.sortOptions[this.activeSearchType]
?.find((sortOption) => this.$route.query._sort.includes(sortOption.query))
// use includes instead of strict equality check to allow localized _sortKeyByLang (e.g. _sortKeyByLang.sv)
) {
return { _sort: this.$route.query._sort };
}
Expand Down

0 comments on commit 281730e

Please sign in to comment.