fix indentation and skip check for references that are inside the function we're checking execution status against
This commit is contained in:
parent
91c463c0f7
commit
59ecfecb9e
@ -298,7 +298,7 @@ export function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncPare
|
|||||||
// no references!
|
// no references!
|
||||||
if (!binding.references) return "before";
|
if (!binding.references) return "before";
|
||||||
|
|
||||||
let referencePaths: Array = binding.referencePaths;
|
let referencePaths: Array<NodePath> = binding.referencePaths;
|
||||||
|
|
||||||
// verify that all of the references are calls
|
// verify that all of the references are calls
|
||||||
for (let path of referencePaths) {
|
for (let path of referencePaths) {
|
||||||
@ -311,7 +311,13 @@ export function _guessExecutionStatusRelativeToDifferentFunctions(targetFuncPare
|
|||||||
|
|
||||||
// verify that all the calls have the same execution status
|
// verify that all the calls have the same execution status
|
||||||
for (let path of referencePaths) {
|
for (let path of referencePaths) {
|
||||||
|
// if a reference is a child of the function we're checking against then we can
|
||||||
|
// safelty ignore it
|
||||||
|
let childOfFunction = !!path.find(path => path === targetFuncPath);
|
||||||
|
if (childOfFunction) continue;
|
||||||
|
|
||||||
let status = this._guessExecutionStatusRelativeTo(path);
|
let status = this._guessExecutionStatusRelativeTo(path);
|
||||||
|
|
||||||
if (allStatus) {
|
if (allStatus) {
|
||||||
if (allStatus !== status) return;
|
if (allStatus !== status) return;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user