From dc572cd83a179eb7d564f9d1ba5e1b44b54fe033 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Mon, 4 Jan 2021 17:33:15 +0000 Subject: [PATCH] Fix slight bug in context error handler --- lib/context.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/context.js b/lib/context.js index d021c8a..ff3baef 100644 --- a/lib/context.js +++ b/lib/context.js @@ -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)); diff --git a/package.json b/package.json index e941a98..2058a04 100644 --- a/package.json +++ b/package.json @@ -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": {