修复比例默认选择和二维码预警崩溃

This commit is contained in:
yml
2026-06-17 21:58:29 +08:00
parent 0a42392d5e
commit 342edad78b
4 changed files with 9 additions and 7 deletions
+3 -2
View File
@@ -170,8 +170,9 @@ export function readFinalSaleRatio(
return roundRatio(Math.min(Math.max(ratio, defaultRatio), maxAcceleratedSaleRatio))
}
export function hasAcceleratedSaleRatioInput(value: number | '') {
return value !== '' && value !== null
export function hasAcceleratedSaleRatioInput(value: number | '' | null | undefined) {
const ratio = Number(value)
return value !== '' && value !== null && value !== undefined && Number.isFinite(ratio) && ratio > 0
}
export function calculatePlatformPricing(options: {