File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
vue-transformations/manual Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,17 @@ export function pushManualList(
14
14
} else {
15
15
index = 0
16
16
}
17
- index = node ?. value . loc ?. start . line + index
18
- let position : string = '[' + index + ',' + node ?. value . loc ?. start . column + ']'
17
+ let line
18
+ let column
19
+ if ( node ?. loc ) {
20
+ line = node ?. loc ?. start . line
21
+ column = node ?. loc ?. start . column
22
+ } else {
23
+ line = node ?. value ?. loc ?. start . line
24
+ column = node ?. value ?. loc ?. start . column
25
+ }
26
+ index = line + index
27
+ let position : string = '[' + index + ',' + column + ']'
19
28
20
29
const list = {
21
30
path : path ,
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ function findNodes(context: any) {
26
26
enterNode ( node : Node ) {
27
27
if (
28
28
node . type === 'VDirectiveKey' &&
29
- node . name . name === 'on' &&
29
+ node ? .name ? .name === 'on' &&
30
30
// @ts -ignore
31
- key . test ( node ?. argument ! . name ) &&
31
+ key . test ( node ?. argument ? .name ) &&
32
32
number . test ( node ?. modifiers [ 0 ] ?. name )
33
33
) {
34
34
toFixNodes . push ( node )
You can’t perform that action at this time.
0 commit comments