Skip to content

Commit

Permalink
ar(fix) DPCP-121: Locale Parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloreale committed Aug 30, 2024
1 parent 515e6ef commit 33f1937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/model/decorators/hypnos-public-decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type { ICard } from '@dreampipcom/oneiros';
/* private */
const decorateListing = (listing: Record<string, any>, uMeta: any, locale?: string): ICard => {
const coerceStringLocale = (localeString: any) => {
const strArr;
return strArr[[1]] || strArr[locale?.split('-')[0]];
const locArr = locale?.split('-');
return localeString[locArr[1]] || localeString[locArr[0]];
};
const decd: ICard = {
id: `${listing.id}`,
Expand Down

0 comments on commit 33f1937

Please sign in to comment.