Skip to content

Commit 91be732

Browse files
committed
fix(lang.decorator): handle 'original' language query parameter
Added a check in the Lang decorator to return undefined if the query parameter 'lang' is set to 'original'. This change ensures that the original language is correctly processed without normalization. Signed-off-by: Innei <tukon479@gmail.com>
1 parent b85f4d0 commit 91be732

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/core/src/common/decorators/lang.decorator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const Lang = createParamDecorator(
1616
const query = request.query as Record<string, unknown>
1717
const queryLang = query?.lang
1818
if (typeof queryLang === 'string') {
19+
if (queryLang.toLowerCase() === 'original') return undefined
1920
const normalized = normalizeLanguageCode(queryLang)
2021
if (normalized) return normalized
2122
}

0 commit comments

Comments
 (0)