Skip to content

Commit

Permalink
fix(core): should support nested routers
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed May 11, 2021
1 parent bf3721c commit c215069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/koishi-core/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ const register = Router.prototype.register
Router.prototype.register = function (this: Router, ...args) {
const layer = register.apply(this, args)
const context: Context = this[Context.current]
context.state.disposables.push(() => {
context?.state.disposables.push(() => {
remove(this.stack, layer)
})
return layer
Expand Down

0 comments on commit c215069

Please sign in to comment.