Skip to content

Commit

Permalink
Update NodeEvaluator.java
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanjan90 committed Nov 19, 2024
1 parent 214c08d commit 2f9b859
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/main/java/gyro/core/scope/NodeEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,12 @@ public void addTypeNode(Node top, Node node) {
addTypeNode(top, item);
}
}

if (node instanceof DirectiveNode) {
for (Node item : ((DirectiveNode) node).getBody()) {
addTypeNode(top, item);
}
}
}

public void evaluateBody(List<Node> body, Scope scope) {
Expand Down Expand Up @@ -771,13 +777,7 @@ private Object resourceResolver(String resourceName, String referenceName, Refer
s = s.filter(r -> DiffableInternals.getName(r).startsWith(prefix));
}

List<Resource> resources = s.collect(Collectors.toList());

if (resources.isEmpty()) {
throw new FindDefer(node, referenceName, resourceName);
}

value = resources;
value = s.collect(Collectors.toList());

} else {
Resource resource = root.findResource(referenceName + "::" + resourceName);
Expand Down

0 comments on commit 2f9b859

Please sign in to comment.