feat(runtime): support rendering comment nodes
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
FunctionalComponent,
|
||||
Data
|
||||
} from './component'
|
||||
import { VNode, normalizeVNode, createVNode, Empty } from './vnode'
|
||||
import { VNode, normalizeVNode, createVNode, Comment } from './vnode'
|
||||
import { ShapeFlags } from './shapeFlags'
|
||||
import { handleError, ErrorCodes } from './errorHandling'
|
||||
import { PatchFlags } from './patchFlags'
|
||||
@@ -45,7 +45,7 @@ export function renderComponentRoot(
|
||||
}
|
||||
} catch (err) {
|
||||
handleError(err, instance, ErrorCodes.RENDER_FUNCTION)
|
||||
result = createVNode(Empty)
|
||||
result = createVNode(Comment)
|
||||
}
|
||||
currentRenderingInstance = null
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user