Skip to content

Commit ce1378e

Browse files
committed
fix: j.Property -> j.ObjectProperty, as we now use babylon
1 parent 7937c75 commit ce1378e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

generator/codemods/global-api/remove-contextual-h.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const addImport = require('../utils/add-import')
99
module.exports = function removeContextualH(context) {
1010
const { j, root } = context
1111

12-
const renderFns = root.find(j.Property, {
12+
const renderFns = root.find(j.ObjectProperty, {
1313
key: {
1414
name: 'render'
1515
},

generator/codemods/router/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ module.exports = function(fileInfo, api) {
4444
}
4545

4646
addImport(context, { imported: initializer }, 'vue-router')
47-
return j.property(
48-
'init',
47+
return j.objectProperty(
4948
j.identifier('history'),
5049
j.callExpression(j.identifier(initializer), [])
5150
)

0 commit comments

Comments
 (0)