From 6ff7275db805bad708aa06fe7b99907568e8c1ad Mon Sep 17 00:00:00 2001 From: Peter Fortuin <1087070+peterfortuin@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:56:52 +0100 Subject: [PATCH] fix(transloco-loader): update deepMerge function type definitions (#167) --- .github/workflows/angular-lint-threshold.yml | 2 +- booklore-ui/src/app/core/config/transloco-loader.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/angular-lint-threshold.yml b/.github/workflows/angular-lint-threshold.yml index 1031a9e17..174116b75 100644 --- a/.github/workflows/angular-lint-threshold.yml +++ b/.github/workflows/angular-lint-threshold.yml @@ -21,7 +21,7 @@ jobs: env: LINT_WARNING_THRESHOLD: 0 - LINT_ERROR_THRESHOLD: 725 + LINT_ERROR_THRESHOLD: 722 BUILD_WARNING_THRESHOLD: 24 steps: diff --git a/booklore-ui/src/app/core/config/transloco-loader.ts b/booklore-ui/src/app/core/config/transloco-loader.ts index cab347eea..0a59432fc 100644 --- a/booklore-ui/src/app/core/config/transloco-loader.ts +++ b/booklore-ui/src/app/core/config/transloco-loader.ts @@ -51,13 +51,13 @@ export const LANG_LABELS: Record = { da: 'Dansk', }; -function deepMerge(base: Record, override: Record): Record { +function deepMerge(base: Record, override: Record): Record { const result = {...base}; for (const key of Object.keys(override)) { if (override[key] && typeof override[key] === 'object' && !Array.isArray(override[key]) && base[key] && typeof base[key] === 'object' && !Array.isArray(base[key])) { result[key] = deepMerge(base[key], override[key]); - } else if (override[key] !== '') { + } else if (override[key]) { result[key] = override[key]; } }