Fix custom power level selection return NaN
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
950bf14d95
commit
3f39fd487f
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ function PowerLevelSelector({
|
|||
value, max, onSelect,
|
||||
}) {
|
||||
const handleSubmit = (e) => {
|
||||
const powerLevel = e.target.elements['power-level'];
|
||||
const powerLevel = e.target.elements['power-level']?.value;
|
||||
if (!powerLevel) return;
|
||||
onSelect(Number(powerLevel));
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue