From 3a966fbc57a748f22189b0f4272593429c6ed6ee Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Thu, 9 Jan 2025 19:41:46 +0000 Subject: [PATCH] refactor: return directly Signed-off-by: Frazer Smith --- lib/fastifyAwilixPlugin.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/fastifyAwilixPlugin.js b/lib/fastifyAwilixPlugin.js index 136d3f2..5e4703b 100644 --- a/lib/fastifyAwilixPlugin.js +++ b/lib/fastifyAwilixPlugin.js @@ -71,9 +71,7 @@ function plugin (fastify, opts, next) { if (instance.awilixManager.config.asyncDispose) { instance.awilixManager .executeDispose() - .then(() => { - return instance.diContainer.dispose() - }) + .then(() => instance.diContainer.dispose()) .then(done, done) } else { instance.diContainer.dispose().then(done, done)