Skip to content

Commit b9217d8

Browse files
fix: fixed template refs with v-for
1 parent 435b91f commit b9217d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/composition-api-template-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Composition API template refs do not have special handling when used inside `v-f
5959

6060
```html
6161
<template>
62-
<div v-for="(item, i) in list" :ref="el => { divs[i] = el }">
62+
<div v-for="(item, i) in list" :ref="el => { if (el) divs[i] = el }">
6363
{{ item }}
6464
</div>
6565
</template>

0 commit comments

Comments
 (0)