From c2ffc906ea1bdd37396e91ee9db8fa69da985ab6 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Fri, 8 Nov 2019 13:52:55 +0100 Subject: [PATCH 1/4] replace arrow functions on frontend with old style function --- app/views/location.ejs | 10 +++++----- app/views/queryReview.ejs | 6 +++--- app/views/realEstateFilters.ejs | 20 ++++++++++---------- app/views/redirect.ejs | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/views/location.ejs b/app/views/location.ejs index 1e34de2..5347281 100644 --- a/app/views/location.ejs +++ b/app/views/location.ejs @@ -42,7 +42,7 @@ function locateMe() { if (navigator.geolocation) { - const onLocationSuccess = (position) => { + function onLocationSuccess (position) { const coordinates = position && position.coords ? position.coords : null; if (coordinates){ const longitude = coordinates.longitude || null; @@ -53,7 +53,7 @@ map.setZoom(16); } } - }; + } navigator.geolocation.getCurrentPosition(onLocationSuccess); } @@ -162,8 +162,8 @@ input.attachEvent = addEventListenerWrapper } - $(document).ready(() => { - $("#submit").click(() => { + $(document).ready(function() { + $("#submit").click(function() { const mapBounds = map.getBounds(); $("#north").val(mapBounds.getNorthEast().lat()); @@ -178,4 +178,4 @@ }); \ No newline at end of file + defer> diff --git a/app/views/queryReview.ejs b/app/views/queryReview.ejs index 7e0f6e4..11af0ed 100644 --- a/app/views/queryReview.ejs +++ b/app/views/queryReview.ejs @@ -68,8 +68,8 @@ -- 2.47.3 From 8a95409606cffa6434c8871495e47c402726c8da Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Fri, 8 Nov 2019 14:03:04 +0100 Subject: [PATCH 2/4] stop using spread operator --- app/views/realEstateFilters.ejs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/realEstateFilters.ejs b/app/views/realEstateFilters.ejs index 72907af..e2b4186 100644 --- a/app/views/realEstateFilters.ejs +++ b/app/views/realEstateFilters.ejs @@ -67,8 +67,8 @@ \ No newline at end of file -- 2.47.3 From a77730cc5fb03f2469de317b594fd16a032a717b Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Fri, 8 Nov 2019 14:07:00 +0100 Subject: [PATCH 4/4] replace arrow function with old style function --- app/views/realEstateFilters.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/realEstateFilters.ejs b/app/views/realEstateFilters.ejs index e2b4186..1b3eb01 100644 --- a/app/views/realEstateFilters.ejs +++ b/app/views/realEstateFilters.ejs @@ -169,7 +169,7 @@ $("#gardenSizeMax").change("step", gardenSizeMaxChangeHandler); <% } %> - $("#submit").click(() => { + $("#submit").click(function() { const priceFilterValues = priceSlider.noUiSlider.get(); $("#priceFilterMin").val(priceFilterValues[0]); $("#priceFilterMax").val(priceFilterValues[1]); -- 2.47.3