From 2dee949af9f3f0bcb5a015bfe4f532c67e13ef0b Mon Sep 17 00:00:00 2001 From: John Leider Date: Wed, 4 Oct 2023 13:21:13 -0500 Subject: [PATCH] fix(VOtpInput): add chain operator to select fn calls --- packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx b/packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx index 810f61f7c26..7591ce677bd 100644 --- a/packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx +++ b/packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx @@ -145,7 +145,7 @@ export const VOtpInput = genericComponent()({ target = 'prev' } else { requestAnimationFrame(() => { - inputRef.value[index].select() + inputRef.value[index]?.select() }) } } @@ -201,7 +201,7 @@ export const VOtpInput = genericComponent()({ if (val < 0) return IN_BROWSER && window.requestAnimationFrame(() => { - inputRef.value[val].select() + inputRef.value[val]?.select() }) })