From 5b4745cd336c0e0f23248c2c5e9420752d69c4f5 Mon Sep 17 00:00:00 2001 From: "Adrian B. Hoffsten" <11799746+asd20752@users.noreply.github.com> Date: Tue, 22 Nov 2022 01:49:41 +0100 Subject: [PATCH 1/2] typeof null will return "object" which will make the next if statement fail --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index eb42310..27e736f 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ module.exports = accesslog; function accesslog(req, res, format, cb) { if (typeof format === 'function') { cb = format; - format = null; + format = undefined; } var remoteAddress = req.connection.remoteAddress; From 615ebce34cee459406fe03fb10e5a957ee302eba Mon Sep 17 00:00:00 2001 From: "Adrian B. Hoffsten" <11799746+asd20752@users.noreply.github.com> Date: Tue, 22 Nov 2022 01:52:51 +0100 Subject: [PATCH 2/2] Version update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f873736..a0608a6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "access-log", "description": "Add simple access logs to any http or https server", - "version": "0.4.1", + "version": "0.4.2", "author": "Dave Eddy (http://www.daveeddy.com)", "contributors": [], "repository": {