Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Mar 25, 2024
1 parent e3f640a commit 1e7db39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/generate/src/syntax/toEdgeQL.ts
Expand Up @@ -935,12 +935,12 @@ function renderEdgeQL(
if (!expr.__expr__) {
return `<${typeName}>{}`;
}
const innerExpr = renderEdgeQL(expr.__expr__, ctx);
const rawInnerExpr = renderEdgeQL(expr.__expr__, ctx);
const isCast =
(expr.__expr__ as any).__kind__ === ExpressionKind.Cast &&
innerExpr[0] === "(";
const expr = isCast ? innerExpr.slice(1, -1) : innerExpr;
return `(<${typeName}>${expr})`;
rawInnerExpr[0] === "(";
const innerExpr = isCast ? rawInnerExpr.slice(1, -1) : rawInnerExpr;
return `(<${typeName}>${innerExpr})`;
} else if (expr.__kind__ === ExpressionKind.Select) {
const lines: string[] = [];
if (isObjectType(expr.__element__)) {
Expand Down

0 comments on commit 1e7db39

Please sign in to comment.