Skip to content

Commit

Permalink
fix: return main composer instead of the nested one
Browse files Browse the repository at this point in the history
  • Loading branch information
carafelix committed Nov 7, 2024
1 parent ad08d10 commit acdf0de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,11 @@ export class Command<C extends Context = Context> implements MiddlewareObj<C> {
}

middleware() {
return new Composer<C>()
.use(this._composer)
.use(this._defaultScopeComposer)
const finalComposer = new Composer<C>()
.use(this._composer);
finalComposer
.use(this._defaultScopeComposer);
return finalComposer
.middleware();
}
}

0 comments on commit acdf0de

Please sign in to comment.