@samitouri / QOS-React-2 / commits / 99dcf03852

AlignBlockScopes visits value block final values

Joe Savona committed Jan 12, 2023 at 09:12 UTC 99dcf038524c86d4acd2041f8e1a17f63bde6222
1 file changed +9 -1
compiler/forget/src/ReactiveScopes/AlignReactiveScopesToBlockScopes.ts
+9 -1
@@ -131,7 +131,15 @@ function visitValueBlock(
131 }
132 }
133 }
134 - // TODO: visit the block value!!
134 + if (block.last !== null) {
135 + context.visitId(block.last.id);
136 + if (block.last.value.kind === "Identifier") {
137 + const scope = getPlaceScope(block.last.id, block.last.value);
138 + if (scope !== null) {
139 + context.visitScope(scope);
140 + }
141 + }
142 + }
143 }
144
145 type PendingReactiveScope = { active: boolean; scope: ReactiveScope };