From d5fe062e7fa09cc38fa35b00807c3f20449f0fae Mon Sep 17 00:00:00 2001 From: Midgard Date: Fri, 22 May 2020 22:01:41 +0200 Subject: [PATCH] Fix race condition --- src/js/map.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/map.js b/src/js/map.js index 11fb069..9adc04f 100644 --- a/src/js/map.js +++ b/src/js/map.js @@ -1,4 +1,9 @@ $(document).ready(function() { + Handlebars.registerHelper("date", function (ddmyyyy) { + return ddmyyyy.replace(/-/g, "/"); + }); + + L.Icon.Default.imagePath = "img/"; var popuptemplate = Handlebars.compile($("#popup-template").html()); @@ -159,9 +164,4 @@ $(document).ready(function() { var legend = new SimpleControl("#legend-template", christmasSeason ? "holiday-legend" : "legend", { position: "bottomright" }).addTo(map); - - - Handlebars.registerHelper("date", function (ddmyyyy) { - return ddmyyyy.replace(/-/g, "/"); - }) });