From 08d808ac826ac5878bbf411f0c532b25ec48ba3d Mon Sep 17 00:00:00 2001 From: Savas Vedova Date: Mon, 17 Apr 2023 22:41:09 +0300 Subject: [PATCH] fix: return after import --- src/utils/callbacks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/callbacks.ts b/src/utils/callbacks.ts index e72770e..169fcb5 100644 --- a/src/utils/callbacks.ts +++ b/src/utils/callbacks.ts @@ -58,7 +58,7 @@ export const handleApi = ( const mod = require(importPath); return mod.default ? mod.default(req, res) : mod(req, res); } catch { - import(importPath).then((mod) => { + return import(importPath).then((mod) => { return mod.default ? mod.default(req, res) : mod(req, res); }); }