Fix a crash when champ carte has no options

This commit is contained in:
Paul Chavard 2021-01-12 13:41:14 +01:00
parent e159c1fc0c
commit 082b4830f3

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?