Fix custom power level selection return NaN
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
@@ -11,7 +11,7 @@ function PowerLevelSelector({
|
|||||||
value, max, onSelect,
|
value, max, onSelect,
|
||||||
}) {
|
}) {
|
||||||
const handleSubmit = (e) => {
|
const handleSubmit = (e) => {
|
||||||
const powerLevel = e.target.elements['power-level'];
|
const powerLevel = e.target.elements['power-level']?.value;
|
||||||
if (!powerLevel) return;
|
if (!powerLevel) return;
|
||||||
onSelect(Number(powerLevel));
|
onSelect(Number(powerLevel));
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user