Skip to content

Commit

Permalink
Update koa-compose.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Rain120 authored Feb 25, 2022
1 parent c9ec0d7 commit 8f765c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions koa-compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ function compose(middleware) {
return dispatch(0);

function dispatch(i) {
if (i >= index) {
if (i <= index) {
return Promise.reject(new Error('next() called multiple times'));
}
if (i <= index) {
return Promise.reject(new Error('next() called multiple times'));
}

index = i;
Expand Down

0 comments on commit 8f765c7

Please sign in to comment.