Skip to content

Commit

Permalink
Fix map double connect
Browse files Browse the repository at this point in the history
At some point in the last few PRs we ended up with the map controller being attached to two elements which causes it to connect and attempt to initialize the map twice. This results in an error in the console.

This change fixes the problem.
  • Loading branch information
jdudley1123 committed Nov 15, 2024
1 parent 4937404 commit c55ad89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/forecasts/_map.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div data-controller="map">
<div>
<%= render partial: "pollutant_selector" %>
<div id="map" class="map w-full h-80" data-maptiler-api-key="<%= @maptiler_api_key %>" data-map-target="map"></div>
<div class="w-full h-10">
Expand Down

0 comments on commit c55ad89

Please sign in to comment.