test: test updates for d40c642

This commit is contained in:
Evan You
2020-02-11 18:40:21 -05:00
parent e3988b40d8
commit e861c6da90
37 changed files with 1261 additions and 1324 deletions

View File

@@ -506,7 +506,7 @@ export function createRoot(
}
export function createVNodeCall(
context: TransformContext,
context: TransformContext | null,
tag: VNodeCall['tag'],
props?: VNodeCall['props'],
children?: VNodeCall['children'],
@@ -517,14 +517,16 @@ export function createVNodeCall(
isForBlock: VNodeCall['isForBlock'] = false,
loc = locStub
): VNodeCall {
if (isBlock) {
context.helper(OPEN_BLOCK)
context.helper(CREATE_BLOCK)
} else {
context.helper(CREATE_VNODE)
}
if (directives) {
context.helper(WITH_DIRECTIVES)
if (context) {
if (isBlock) {
context.helper(OPEN_BLOCK)
context.helper(CREATE_BLOCK)
} else {
context.helper(CREATE_VNODE)
}
if (directives) {
context.helper(WITH_DIRECTIVES)
}
}
return {