fix: prevent crash from insane height param
Build and Deploy / build-and-deploy (push) Successful in 1m5s

This commit is contained in:
2026-07-10 12:24:56 +07:00 Unverified
parent d4ae8873ff
commit f1729a03bb
+8 -4
View File
@@ -375,8 +375,10 @@ export function card(app: App) {
: mockData, : mockData,
]); ]);
const height = const height = Math.min(
typeof w === "number" ? w / (1218 / 508) : heightRaw; typeof w === "number" ? w / (1218 / 508) : heightRaw,
2048,
);
const cacheKey = hash( const cacheKey = hash(
JSON.stringify({ JSON.stringify({
@@ -660,8 +662,10 @@ export function card(app: App) {
profilePlayerInfo(avatar.owner, avatar), profilePlayerInfo(avatar.owner, avatar),
]); ]);
const height = const height = Math.min(
typeof w === "number" ? w / (1218 / 508) : heightRaw; typeof w === "number" ? w / (1218 / 508) : heightRaw,
2048,
);
const cacheKey = hash( const cacheKey = hash(
JSON.stringify({ JSON.stringify({