Skip to content

Commit

Permalink
fix(runtime-core): handle template ref with number values (#8233)
Browse files Browse the repository at this point in the history
close #8230
  • Loading branch information
Alfred-Skyblue committed May 5, 2023
1 parent 038cd83 commit 1b1242f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/runtime-core/src/vnode.ts
Expand Up @@ -404,6 +404,9 @@ const normalizeRef = ({
ref_key,
ref_for
}: VNodeProps): VNodeNormalizedRefAtom | null => {
if (typeof ref === 'number') {
ref = '' + ref
}
return (
ref != null
? isString(ref) || isRef(ref) || isFunction(ref)
Expand Down

0 comments on commit 1b1242f

Please sign in to comment.