mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 19:18:26 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -21,12 +21,16 @@ export function resolveAgentTimeoutMs(opts: {
|
||||
const defaultMs = resolveAgentTimeoutSeconds(opts.cfg) * 1000;
|
||||
const overrideMs = normalizeNumber(opts.overrideMs);
|
||||
if (overrideMs !== undefined) {
|
||||
if (overrideMs <= 0) return defaultMs;
|
||||
if (overrideMs <= 0) {
|
||||
return defaultMs;
|
||||
}
|
||||
return Math.max(overrideMs, minMs);
|
||||
}
|
||||
const overrideSeconds = normalizeNumber(opts.overrideSeconds);
|
||||
if (overrideSeconds !== undefined) {
|
||||
if (overrideSeconds <= 0) return defaultMs;
|
||||
if (overrideSeconds <= 0) {
|
||||
return defaultMs;
|
||||
}
|
||||
return Math.max(overrideSeconds * 1000, minMs);
|
||||
}
|
||||
return Math.max(defaultMs, minMs);
|
||||
|
||||
Reference in New Issue
Block a user