chore(types): remove unnecessary non-null assertion (#4169)

This commit is contained in:
webfansplz 2021-07-22 03:50:08 +08:00 committed by GitHub
parent d13774b881
commit 9c931d8154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -52,12 +52,12 @@ export const transformBind: DirectiveTransform = (dir, _node, context) => {
) {
context.onError(createCompilerError(ErrorCodes.X_V_BIND_NO_EXPRESSION, loc))
return {
props: [createObjectProperty(arg!, createSimpleExpression('', true, loc))]
props: [createObjectProperty(arg, createSimpleExpression('', true, loc))]
}
}
return {
props: [createObjectProperty(arg!, exp)]
props: [createObjectProperty(arg, exp)]
}
}

View File

@ -207,7 +207,7 @@ export function ssrProcessComponent(
// component is inside a slot, inherit slot scope Id
if (context.withSlotScopeId) {
node.ssrCodegenNode!.arguments.push(`_scopeId`)
node.ssrCodegenNode.arguments.push(`_scopeId`)
}
if (typeof component === 'string') {