Skip to content

Commit

Permalink
fix(cloud): Fix CloudCommandFacade#getHelp invalid result if query is…
Browse files Browse the repository at this point in the history
… blank
  • Loading branch information
phinner committed Jan 16, 2025
1 parent 0ef0aec commit 8b8443a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ public boolean isVisible(final CommandSender sender) {
}

@Override
public CommandHelp getHelp(final CommandSender sender, final String query) {
public CommandHelp getHelp(final CommandSender sender, String query) {
final var mapped = this.manager.senderMapper().map(sender);
final var result =
this.manager.createHelpHandler().query(HelpQuery.of(mapped, this.getRealName() + " " + query));
query = query.isBlank() ? this.getRealName() : this.getRealName() + " " + query.trim();
final var result = this.manager.createHelpHandler().query(HelpQuery.of(mapped, query));
if (result instanceof MultipleCommandResult<C> multi) {
return CommandHelp.Suggestion.of(multi.longestPath(), multi.childSuggestions());
} else if (result instanceof VerboseCommandResult<C> verbose) {
Expand Down

0 comments on commit 8b8443a

Please sign in to comment.