fix(plugin): guard against NaN fpsAvg bypassing upload check
This commit is contained in:
@@ -211,7 +211,7 @@ export default function SessionForm({
|
||||
setError("No API key configured. Set one in the Settings tab.")
|
||||
return
|
||||
}
|
||||
if (session.fpsAvg == null || session.fpsAvg <= 0) {
|
||||
if (session.fpsAvg == null || !(session.fpsAvg > 0)) {
|
||||
setError("No FPS data captured. Re-record the session, or use Export to File only.")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ export function buildImportPayload(sess: SessionData): DeckyVaultImportV1 {
|
||||
version: 1,
|
||||
steamAppId: sess.appId ?? 0,
|
||||
hardwareSlug: sess.hardwareSlug,
|
||||
fpsAvg: sess.fpsAvg == null || sess.fpsAvg <= 0 ? 0 : sanitizeFps(sess.fpsAvg)!,
|
||||
fpsAvg: sess.fpsAvg == null || !(sess.fpsAvg > 0) ? 0 : sanitizeFps(sess.fpsAvg)!,
|
||||
fpsLow: sanitizeFps(sess.fpsLow),
|
||||
fpsOnePercentLow: sanitizeFps(sess.fpsOnePercentLow),
|
||||
fpsHigh: sanitizeFps(sess.fpsHigh),
|
||||
|
||||
Reference in New Issue
Block a user