chore: fix typo for babelParserDefautPlugins (#1897)

This commit is contained in:
edison
2020-08-19 21:53:09 +08:00
committed by GitHub
parent 7dd067206c
commit 075d769e0b
5 changed files with 14 additions and 16 deletions

View File

@@ -113,15 +113,13 @@ export const transformModel: DirectiveTransform = (dir, node, context) => {
// native vmodel doesn't need the `modelValue` props since they are also
// passed to the runtime as `binding.value`. removing it reduces code size.
baseResult.props = baseResult.props.filter(p => {
if (
p.key.type === NodeTypes.SIMPLE_EXPRESSION &&
p.key.content === 'modelValue'
) {
return false
}
return true
})
baseResult.props = baseResult.props.filter(
p =>
!(
p.key.type === NodeTypes.SIMPLE_EXPRESSION &&
p.key.content === 'modelValue'
)
)
return baseResult
}