Skip to content

Commit 2dee949

Browse files
committed
fix(VOtpInput): add chain operator to select fn calls
1 parent 313f5d5 commit 2dee949

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vuetify/src/labs/VOtpInput/VOtpInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export const VOtpInput = genericComponent<VOtpInputSlots>()({
145145
target = 'prev'
146146
} else {
147147
requestAnimationFrame(() => {
148-
inputRef.value[index].select()
148+
inputRef.value[index]?.select()
149149
})
150150
}
151151
}
@@ -201,7 +201,7 @@ export const VOtpInput = genericComponent<VOtpInputSlots>()({
201201
if (val < 0) return
202202

203203
IN_BROWSER && window.requestAnimationFrame(() => {
204-
inputRef.value[val].select()
204+
inputRef.value[val]?.select()
205205
})
206206
})
207207

0 commit comments

Comments
 (0)