Skip to content

Commit c5c1e31

Browse files
committed
Fix more ts issues
1 parent 0a10a8e commit c5c1e31

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/utils/assets/logo.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,19 @@ export const resolveSize = ({ width, height, logo }: Size & { logo: Logo }): Siz
128128
// Only the width is provided, therefore only the width should be set
129129
return {
130130
width: width,
131-
height: resolveRatio({ baseHeight: logo.height, baseWidth: logo.width, width, height }).height,
131+
height: resolveRatio({ baseHeight: logo?.thumbnails?.small?.height, baseWidth: logo?.thumbnails?.small?.width, width, height }).height,
132132
};
133133
} else if (height) {
134134
// Only the height is provided, therefore only the height should be set
135135
return {
136-
width: resolveRatio({ baseHeight: logo.height, baseWidth: logo.width, width, height }).width,
136+
width: resolveRatio({ baseHeight: logo?.thumbnails?.small?.height, baseWidth: logo?.thumbnails?.small?.width, width, height }).width,
137137
height: height,
138138
};
139139
} else {
140140
// If no height nor width are provided, use the default logo values
141141
return {
142-
width: logo.width,
143-
height: logo.height,
142+
width: logo?.thumbnails?.small?.width,
143+
height: logo?.thumbnails?.small?.height,
144144
};
145145
}
146146
};

0 commit comments

Comments
 (0)