Skip to content

Commit 08dbdcd

Browse files
committed
only initialize the current map
- issues#show would whod a double map otherwise (since the helper is called twice - once for show, once for the (hidden) form
1 parent 9979c5c commit 08dbdcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/helpers/gtt_map_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def map_tag(map: nil, layers: map&.layers,
3434
content_tag(:div, "", data: data, id: uid, class: 'ol-map'),
3535
javascript_tag("
3636
$(document).ready(function(){
37-
$('div.ol-map').each(function(idx) {
37+
$('##{uid}').each(function(idx) {
3838
App.init({
3939
target: this
4040
});

0 commit comments

Comments
 (0)