Skip to content

Commit

Permalink
fix(PinInput): error throw from resetPlaceholder's nextTick if compon…
Browse files Browse the repository at this point in the history
…ent not in the DOM anymore
  • Loading branch information
hartbit committed Feb 3, 2025
1 parent 14da5f1 commit 0a1f18b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/radix-vue/src/PinInput/PinInputInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function handleInput(event: InputEvent) {
function resetPlaceholder() {
const target = currentElement.value as HTMLInputElement
nextTick(() => {
if (!target.value)
if (target && !target.value)
target.placeholder = context.placeholder.value
})
}
Expand Down

0 comments on commit 0a1f18b

Please sign in to comment.