@@ -145,8 +145,8 @@ export const transformElement: NodeTransform = (node, context) => {
145145 }
146146
147147 // children
148- if ( node . children . length > 0 ) {
149- let filterdChildren = node . children
148+ if ( node . children . length > 0 ) {
149+ let children = node . children
150150 if ( vnodeTag === KEEP_ALIVE ) {
151151 // Although a built-in component, we compile KeepAlive with raw children
152152 // instead of slot functions so that it can be used inside Transition
@@ -158,13 +158,13 @@ export const transformElement: NodeTransform = (node, context) => {
158158 // 2. Force keep-alive to always be updated, since it uses raw children.
159159 patchFlag |= PatchFlags . DYNAMIC_SLOTS
160160 //filter out potential comment nodes
161- filterdChildren = filterdChildren . filter ( c => c . type !== NodeTypes . COMMENT )
161+ children = children . filter ( c => c . type !== NodeTypes . COMMENT )
162162 // warn if <KeepAlive> has multiple children
163- if ( __DEV__ && filterdChildren . length > 1 ) {
163+ if ( __DEV__ && children . length > 1 ) {
164164 context . onError (
165165 createCompilerError ( ErrorCodes . X_KEEP_ALIVE_INVALID_CHILDREN , {
166- start : filterdChildren [ 0 ] . loc . start ,
167- end : filterdChildren [ filterdChildren . length - 1 ] . loc . end ,
166+ start : children [ 0 ] . loc . start ,
167+ end : children [ children . length - 1 ] . loc . end ,
168168 source : ''
169169 } )
170170 )
@@ -184,8 +184,8 @@ export const transformElement: NodeTransform = (node, context) => {
184184 if ( hasDynamicSlots ) {
185185 patchFlag |= PatchFlags . DYNAMIC_SLOTS
186186 }
187- } else if ( filterdChildren . length === 1 && vnodeTag !== TELEPORT ) {
188- const child = filterdChildren [ 0 ]
187+ } else if ( children . length === 1 && vnodeTag !== TELEPORT ) {
188+ const child = children [ 0 ]
189189 const type = child . type
190190 // check for dynamic text children
191191 const hasDynamicTextChild =
0 commit comments