From 86b07af63df972eb91624ca58f953336d4904a79 Mon Sep 17 00:00:00 2001 From: Timo Hocker <35867059+TimoHocker@users.noreply.github.com> Date: Mon, 3 Jan 2022 14:46:12 +0100 Subject: [PATCH] fix --- lib/Gateway.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Gateway.ts b/lib/Gateway.ts index 8e495a1..b60830f 100644 --- a/lib/Gateway.ts +++ b/lib/Gateway.ts @@ -29,13 +29,14 @@ class GatewayClass { public deny (res: ServerResponse): void { res.statusCode = 403; - res.end(); + res.end (); } public redirect (res: ServerResponse): void { - if (typeof this._options.redirect_url !== 'string') - return this.deny(res); - + if (typeof this._options.redirect_url !== 'string') { + this.deny (res); + return; + } res.statusCode = 302; res.setHeader ('Location', this._options.redirect_url); res.end ();