From ee8c49cef6579c04049e115ab5ce2ab37c50f213 Mon Sep 17 00:00:00 2001 From: Idan Entin Date: Wed, 21 Sep 2022 16:24:40 +0300 Subject: [PATCH] refactor: lazy call to get accessible value Co-authored-by: Wayne Van Son --- src/utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 900fca14..0b52fb45 100644 --- a/src/utils.js +++ b/src/utils.js @@ -219,8 +219,7 @@ function getSingleElementValue(element) { case 'select': return getSelectValue(element) default: { - const accessibleValue = getAccessibleValue(element) - return element.value ?? accessibleValue + return element.value ?? getAccessibleValue(element) } } }