Skip to content

Instantly share code, notes, and snippets.

@chuckha
Created April 26, 2017 18:56
Show Gist options
  • Save chuckha/203eb77e33edab86b033f9258e6e3439 to your computer and use it in GitHub Desktop.
Save chuckha/203eb77e33edab86b033f9258e6e3439 to your computer and use it in GitHub Desktop.
diff --git a/app/controllers/maps_controller.rb b/app/controllers/maps_controller.rb
index 0ca8b08..6a832d2 100644
--- a/app/controllers/maps_controller.rb
+++ b/app/controllers/maps_controller.rb
@@ -86,7 +86,8 @@ class MapsController < ApplicationController
@tracks = []
expeditions.each do |exp|
- if exp.style['simplify'] == true
+
+ if !exp.style.nil? && exp.style['simplify'] == true
@positions = exp.simplified_positions
positions = @positions
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment