From 45ea2d7b8b87657fa8115e2b32e2604b65170d97 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sat, 28 Oct 2023 12:58:48 +0100 Subject: [PATCH] refactor(plugin): replace `typeof` undefined check --- plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.js b/plugin.js index f5131f1..52d56f6 100644 --- a/plugin.js +++ b/plugin.js @@ -126,7 +126,7 @@ function plugin (fastify, options, next) { fastify.decorate('serializeCookie', cookie.serialize) fastify.decorate('parseCookie', parseCookie) - if (typeof secret !== 'undefined') { + if (secret !== undefined) { fastify.decorate('signCookie', signCookie) fastify.decorate('unsignCookie', unsignCookie)