mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-02 04:46:18 -05:00
chore: address Greptile P2 review comments on PR 449
- In get_effective_video_settings: on unparseable sleep_requests, delete
the key instead of forcing 0.0. This lets the global config default
(already present from _extract_global_inheritable) take effect, as
suggested by Greptile.
- In handleInputEvent: add explicit `value !== ''` guard before the
isNaN check. Prevents silent NaN in form state for empty number
fields (isNaN('') === false in JS).
Both changes are strict improvements with no behavior change for
valid inputs.
This commit is contained in:
parent
9cc5c15e32
commit
345b69b7d7
2 changed files with 5 additions and 4 deletions
|
|
@ -789,7 +789,9 @@ def get_effective_video_settings(download_settings: dict = None) -> dict:
|
|||
try:
|
||||
effective['sleep_requests'] = float(effective['sleep_requests'])
|
||||
except (TypeError, ValueError):
|
||||
effective['sleep_requests'] = 0.0
|
||||
# Remove corrupt value so the global config default (already populated
|
||||
# earlier via _extract_global_inheritable) takes effect.
|
||||
del effective['sleep_requests']
|
||||
return effective
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue