Skip to content

Commit 1b1242f

Browse files
fix(runtime-core): handle template ref with number values (#8233)
close #8230
1 parent 038cd83 commit 1b1242f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/runtime-core/src/vnode.ts

+3
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ const normalizeRef = ({
404404
ref_key,
405405
ref_for
406406
}: VNodeProps): VNodeNormalizedRefAtom | null => {
407+
if (typeof ref === 'number') {
408+
ref = '' + ref
409+
}
407410
return (
408411
ref != null
409412
? isString(ref) || isRef(ref) || isFunction(ref)

0 commit comments

Comments
 (0)