replace arrow functions on frontend with old style function
This commit is contained in:
@@ -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 @@
|
||||
});
|
||||
</script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAna8ohfV2HBMcxGk_29vqxU5Z_bDickqg&language=bs&libraries=places&callback=initMap" async
|
||||
defer></script>
|
||||
defer></script>
|
||||
|
||||
Reference in New Issue
Block a user