Skip to content

Commit 06707f4

Browse files
mihaelabalutoiuDany9966
authored andcommitted
Fix regex in getOptimalLogoHeightKey to correctly
parse height numbers Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
1 parent 3af72b3 commit 06707f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/api/LogosApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const getOptimalLogoHeightKey = (
4141
}
4242

4343
const optimal = heightKeys.reduce((prev, curr) => {
44-
let prevHeight: any = /d+/.exec(prev);
45-
let currHeight: any = /d+/.exec(curr);
44+
let prevHeight: any = /\d+/.exec(prev);
45+
let currHeight: any = /\d+/.exec(curr);
4646
prevHeight = prevHeight ? Number(prevHeight[0]) : 0;
4747
currHeight = currHeight ? Number(currHeight[0]) : 0;
4848
return Math.abs(currHeight - requestedHeight) <

0 commit comments

Comments
 (0)