From 5d174994c8e246f5d2cd0afd2993973cacac7177 Mon Sep 17 00:00:00 2001 From: rayelliott Date: Mon, 30 Mar 2020 20:33:13 +0000 Subject: [PATCH] initialise mapbox on contentReplaced event --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index c0cf5bb..3a1017c 100644 --- a/src/index.js +++ b/src/index.js @@ -57,10 +57,10 @@ window.addEventListener("DOMContentLoaded", () => { // DOMContentLoaded is not triggered on page reloads via swup.js swup.on("contentReplaced", () => { initBlocks(); + initMapbox(); }); initBlocks(); - swup.scrollTo(document.getElementById("#contact")); // TODO remove initMapbox(); });