Merge pull request #5832 from tchak/fix-carte-without-options

Fix a crash when champ carte has no options
This commit is contained in:
Paul Chavard 2021-01-12 16:23:07 +01:00 committed by GitHub
commit 20be409446
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@ class Champs::CarteChamp < Champ
end
def layer_enabled?(layer)
type_de_champ.options[layer] && type_de_champ.options[layer] != '0'
type_de_champ.options && type_de_champ.options[layer] && type_de_champ.options[layer] != '0'
end
def cadastres?