Skip to content

Commit

Permalink
fix: use process.nextTick() re: Automattic/mongoose#6074
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Feb 1, 2018
1 parent fe87ab6 commit e5bfe33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -417,7 +417,7 @@ function decorateNextFn(fn) {
called = true;
// Make sure to clear the stack so try/catch doesn't catch errors
// in subsequent middleware
return setImmediate(() => fn.apply(_this, arguments));
return process.nextTick(() => fn.apply(_this, arguments));
};
}

Expand Down

0 comments on commit e5bfe33

Please sign in to comment.