[commands] Fix infinite recursion on subgroups without a command.

Just as an FYI, ctx.invoked_subcommand will end up being an instance
    of commands.Group!
This commit is contained in:
Will Tekulve 2016-03-30 13:17:44 -04:00 committed by Rapptz
parent 7dcf0c059c
commit 174016c918

View File

@ -573,7 +573,7 @@ class Group(GroupMixin, Command):
injected = inject_context(ctx, self.callback)
yield from injected(*ctx.args, **ctx.kwargs)
if ctx.invoked_subcommand:
if trigger and ctx.invoked_subcommand:
ctx.invoked_with = trigger
yield from ctx.invoked_subcommand.invoke(ctx)
elif not early_invoke: