Skip to content

Commit d59df0d

Browse files
committed
Pass PathLeaf even if "scoped from" another expr
TODO: why does this fix it? Maybe it's being erroneously marked as scoped-from in this case?
1 parent 3a05df4 commit d59df0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/generate/src/syntax/toEdgeQL.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ function walkExprTree(
397397

398398
const expr = _expr as SomeExpression;
399399

400-
if ((expr as any).__scopedFrom__ != null) {
400+
if (
401+
(expr as any).__scopedFrom__ != null &&
402+
expr.__kind__ !== ExpressionKind.PathLeaf
403+
) {
401404
// If expr is marked as being a scoped copy of another expr, treat it as
402405
// an opaque reference and don't walk it. The enclosing select/update that
403406
// owns the scope will walk the actual unscoped expr.

0 commit comments

Comments
 (0)