Skip to content

Commit 9afe634

Browse files
authored
Merge pull request #614 from witheve/has-database-scans
Fix determining if a stratum has database scans
2 parents eb91b38 + bf337be commit 9afe634

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/runtime/block.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,14 @@ function hasDatabaseScan(strata) {
141141
for(let stratum of strata) {
142142
for(let scan of stratum.scans) {
143143
if(scan instanceof Scan) return true;
144-
if(scan instanceof IfScan) return true;
145-
if(scan instanceof NotScan) return true;
144+
if(scan instanceof IfScan) {
145+
for(let branch of scan.branches) {
146+
if(hasDatabaseScan(branch.strata)) return true;
147+
}
148+
}
149+
if(scan instanceof NotScan) {
150+
if(hasDatabaseScan(scan.strata)) return true;
151+
}
146152
}
147153
}
148154
return false;

0 commit comments

Comments
 (0)