From 9cbaff78730f2a44f2c42ebfa662bd630e9e67b8 Mon Sep 17 00:00:00 2001 From: Sergio Regueira Date: Thu, 13 Aug 2020 11:59:24 +0200 Subject: [PATCH] Fix gulp-eslint error due to unexpected token (#219) --- lib/mockRequest.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/mockRequest.js b/lib/mockRequest.js index b8213fe..d454024 100644 --- a/lib/mockRequest.js +++ b/lib/mockRequest.js @@ -506,15 +506,16 @@ function createRequest(options) { * Subdomains are the dot-separated parts of the host before the main domain of the app. * */ - mockRequest.subdomains = (() => { - - if (!mockRequest.headers.host) return []; + mockRequest.subdomains = (function() { + if (!mockRequest.headers.host) { + return []; + } var offset = 2; - const subdomains = mockRequest.headers.host.split('.').reverse(); + var subdomains = mockRequest.headers.host.split('.').reverse(); return subdomains.slice(offset); - })() + }()); return mockRequest; }