If a redirect returned nothing, return nothing.
This commit is contained in:
parent
43e18f6a04
commit
59a27953be
1 changed files with 5 additions and 1 deletions
|
@ -88,7 +88,11 @@ public class CommandDispatcher<S> {
|
|||
if (child != null) {
|
||||
if (!child.getNodes().isEmpty()) {
|
||||
final RedirectModifier<S> modifier = Iterators.getLast(context.getNodes().keySet().iterator()).getRedirectModifier();
|
||||
for (final S source : modifier.apply(context.build())) {
|
||||
final Collection<S> results = modifier.apply(context.build());
|
||||
if (results.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
for (final S source : results) {
|
||||
contexts.add(child.copy().withSource(source));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue