From 3f39fd487fb90d6eb2d3af594a2842b3c690b0cb Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 12 Jan 2022 11:40:55 +0530 Subject: [PATCH] Fix custom power level selection return NaN Signed-off-by: Ajay Bura --- src/app/molecules/power-level-selector/PowerLevelSelector.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/molecules/power-level-selector/PowerLevelSelector.jsx b/src/app/molecules/power-level-selector/PowerLevelSelector.jsx index 7d531bf..ca3e841 100644 --- a/src/app/molecules/power-level-selector/PowerLevelSelector.jsx +++ b/src/app/molecules/power-level-selector/PowerLevelSelector.jsx @@ -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)); };