This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +6
-0
lines changed Expand file tree Collapse file tree 4 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ export function injectApiCustomElement(
86
86
) {
87
87
if ( node . type === 'Identifier'
88
88
&& node . name === 'VueElement'
89
+ && parent
89
90
&& parent . type === 'ClassDeclaration' )
90
91
isVueElementIdentifier = true
91
92
@@ -109,6 +110,7 @@ export function injectApiCustomElement(
109
110
110
111
if ( node . type === 'Identifier'
111
112
&& node . name === '_applyStyles'
113
+ && parent
112
114
&& parent . type === 'ClassMethod'
113
115
&& isVueElementIdentifier
114
116
&& isBaseClassIdentifier ) {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export function injectToComponent(
15
15
parent : FunctionDeclaration ,
16
16
) {
17
17
if ( node . type === 'Identifier'
18
+ && parent
18
19
&& parent . type === 'FunctionDeclaration'
19
20
&& node . name === 'createComponentInstance' )
20
21
isCreateComponentInstance = true
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export function injectToRenderer(
34
34
isComponentUpdateFnIdentifier = true
35
35
36
36
if ( isComponentUpdateFnIdentifier
37
+ && parent
37
38
&& parent . type === 'VariableDeclarator'
38
39
&& node . type === 'Identifier'
39
40
&& node . name === 'subTree' ) {
@@ -45,6 +46,7 @@ export function injectToRenderer(
45
46
isUnmountIdentifier = true
46
47
47
48
if ( isUnmountIdentifier
49
+ && parent
48
50
&& parent . type === 'CallExpression'
49
51
&& node . type === 'Identifier'
50
52
&& node . name === 'unmountComponent' ) {
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export function injectPatchProp(
26
26
) {
27
27
if ( ( node as Identifier ) . type === 'Identifier'
28
28
&& ( node as Identifier ) . name === 'patchProp'
29
+ && parent
29
30
&& parent . type === 'VariableDeclarator' )
30
31
isPatchPropIdentifier = true
31
32
You can’t perform that action at this time.
0 commit comments