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 ();