Skip to content

Commit

Permalink
THE-1364 fix verification des valeurs obtenues pour le tri avant trai…
Browse files Browse the repository at this point in the history
…tement
  • Loading branch information
clementdelafontaine committed Oct 14, 2024
1 parent 5cdd814 commit 3fc4422
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions components/common/results/SortingSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,30 @@ function updateDataTri() {
* @returns {Array}
*/
function getTranslatedItemsTri() {
return getItemsTri().map(item => ({
...item,
nom: t(item.nom)
}));
const itemsTri = getItemsTri();
if (!!itemsTri) {
return itemsTri.map(item => ({
...item,
nom: t(item.nom)
}));
}
}
/**
* Retourne le tri appliqaué traduit
* Retourne le tri appliqué traduit
* @returns {Array}
*/
function getTranslatedCurrentSortName() {
let obj = getCurrentSortName();
return {
...obj,
cle: obj.cle,
nom: t(obj.nom)
const currentSortName = getCurrentSortName();
if (!!currentSortName) {
let obj = getCurrentSortName();
return {
...obj,
cle: obj.cle,
nom: t(obj.nom)
};
}
}
Expand Down

0 comments on commit 3fc4422

Please sign in to comment.