Parcourir la source

Fix custom labels and descriptions

Angus McLeod il y a 6 ans
Parent
commit
b4e8572fd7
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      lib/wizard_edits.rb

+ 2 - 2
lib/wizard_edits.rb

@@ -142,12 +142,12 @@ end
   attributes :dropdown_none, :image
 
   def label
-    return object.label if object.label
+    return object.label if object.label.present?
     I18n.t("#{object.key || i18n_key}.label", default: '')
   end
 
   def description
-    return object.description if object.description
+    return object.description if object.description.present?
     I18n.t("#{object.key || i18n_key}.description", default: '', base_url: Discourse.base_url)
   end