From cdc7c3e5362414cd11aa5796dc325a16a5c588fd Mon Sep 17 00:00:00 2001 From: Andrew Mamdouh <68063809+AndrewMamdouh@users.noreply.github.com> Date: Sun, 21 Apr 2024 13:41:13 +0200 Subject: [PATCH] Fix 'updateTokens' to change tokens value (#6433) --- components/lib/inputotp/InputOtp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/inputotp/InputOtp.js b/components/lib/inputotp/InputOtp.js index 6acd94dc69..1fe5730ea4 100644 --- a/components/lib/inputotp/InputOtp.js +++ b/components/lib/inputotp/InputOtp.js @@ -68,7 +68,7 @@ export const InputOtp = React.memo( const updateTokens = (event, index) => { const inputValue = event.target.value; - const newTokens = [...tokens]; + let newTokens = [...tokens]; newTokens[index] = inputValue; newTokens = newTokens.join('');