Skip to content

Commit

Permalink
Defer resolving resources ending with a wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanjan90 committed Oct 21, 2024
1 parent 7c53584 commit 214c08d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/main/java/gyro/core/scope/NodeEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,13 @@ private Object resourceResolver(String resourceName, String referenceName, Refer
s = s.filter(r -> DiffableInternals.getName(r).startsWith(prefix));
}

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

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

value = resources;

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

0 comments on commit 214c08d

Please sign in to comment.