Skip to content

Commit a86e62b

Browse files
authoredFeb 4, 2022
fix: add check for empty args[1] (unplugin#302)
1 parent 186f65b commit a86e62b

File tree

1 file changed

+1
-1
lines changed
  • src/core/transforms/directive

1 file changed

+1
-1
lines changed
 

‎src/core/transforms/directive/vue2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default async function resolveVue2(code: string, s: MagicString): Promise
4343
for (const node of nodes) {
4444
const { callee, arguments: args } = node
4545
// _c(_, {})
46-
if (callee.type !== 'Identifier' || callee.name !== '_c' || args[1].type !== 'ObjectExpression')
46+
if (callee.type !== 'Identifier' || callee.name !== '_c' || args[1] == null || args[1].type !== 'ObjectExpression')
4747
continue
4848

4949
// { directives: [] }

0 commit comments

Comments
 (0)