File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,13 @@ def view_layouts_base_html_head(context={})
14
14
def view_layouts_base_body_bottom ( context = { } )
15
15
tags = [ ] ;
16
16
geocoder = { }
17
- begin
18
- geocoder = JSON . parse ( Setting . plugin_redmine_gtt [ 'default_geocoder_options' ] )
19
- rescue JSON ::ParserError => exception
20
- Rails . logger . warn "Failed to parse setting's 'geocoder_options' as JSON: #{ exception } \n Use default '{}' instead."
17
+ geocoder_options = Setting . plugin_redmine_gtt [ 'default_geocoder_options' ]
18
+ if geocoder_options . present?
19
+ begin
20
+ geocoder = JSON . parse ( )
21
+ rescue JSON ::ParserError => exception
22
+ Rails . logger . warn "Failed to parse setting's 'geocoder_options' as JSON: #{ exception } \n Use default '{}' instead."
23
+ end
21
24
end
22
25
tags . push ( tag . div :data => {
23
26
:lon => Setting . plugin_redmine_gtt [ 'default_map_center_longitude' ] ,
You can’t perform that action at this time.
0 commit comments