From c2ffc906ea1bdd37396e91ee9db8fa69da985ab6 Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Fri, 8 Nov 2019 13:52:55 +0100 Subject: [PATCH] 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 @@