From 42e1d8d06950c48e53ecd08105e7d061a044c1e3 Mon Sep 17 00:00:00 2001 From: Mihaela Balutoiu Date: Wed, 18 Mar 2026 10:36:08 +0200 Subject: [PATCH] Fix regex in `getOptimalLogoHeightKey` to correctly parse height numbers Signed-off-by: Mihaela Balutoiu --- server/api/LogosApi.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/LogosApi.ts b/server/api/LogosApi.ts index df278d54..1803ad35 100644 --- a/server/api/LogosApi.ts +++ b/server/api/LogosApi.ts @@ -41,8 +41,8 @@ const getOptimalLogoHeightKey = ( } const optimal = heightKeys.reduce((prev, curr) => { - let prevHeight: any = /d+/.exec(prev); - let currHeight: any = /d+/.exec(curr); + let prevHeight: any = /\d+/.exec(prev); + let currHeight: any = /\d+/.exec(curr); prevHeight = prevHeight ? Number(prevHeight[0]) : 0; currHeight = currHeight ? Number(currHeight[0]) : 0; return Math.abs(currHeight - requestedHeight) <