Fix slight bug in context error handler

master v2.10.1
Jonatan Nilsson 2021-01-04 17:33:15 +00:00
parent d1bcd10f82
commit dc572cd83a
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ const proto = module.exports = {
// don't do anything if there is no error.
// this allows you to pass `this.onerror`
// to node-style callbacks.
if (null == err) return;
if (!err) return;
if (!(err instanceof Error)) err = new Error(util.format('non-error thrown: %j', err));

View File

@ -1,6 +1,6 @@
{
"name": "koa-lite",
"version": "2.10.0",
"version": "2.10.1",
"description": "Lite version of the Koa web app framework",
"main": "lib/application.js",
"scripts": {