File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
- import { TEXT_NODE_TYPES } from './const.js' ;
1
+ import { TEXT_NODE_TYPES , UN_KNOWN } from './const.js' ;
2
2
import {
3
3
FileInfoTree ,
4
4
FuncCallSearchResult ,
@@ -13,11 +13,18 @@ import { handleCircularPath } from './utils/handle_circular_path.js';
13
13
function getImpacts ( treeData : FileInfoTree , funcInfo : ImpactReason ) {
14
14
let templateImpact = [ ] as TemplateImpactResult [ ] ;
15
15
16
+ let mainFuncPosition = UN_KNOWN ;
17
+ try {
18
+ mainFuncPosition = treeData [ funcInfo . filePath ] [ 'allFuncsInfo' ] [ funcInfo . name ] . position ;
19
+ } catch ( error ) { }
20
+
16
21
// function entrance
17
22
const main = {
18
23
name : funcInfo . name ,
19
24
file : funcInfo . filePath ,
25
+ position : mainFuncPosition ,
20
26
} ;
27
+ funcInfo . paths [ 0 ] . push ( mainFuncPosition ) ;
21
28
22
29
let callList = [ funcInfo ] as ImpactReason [ ] ;
23
30
const impactReport = [ ] ;
You can’t perform that action at this time.
0 commit comments