diff options
Diffstat (limited to 'acf2/model')
-rw-r--r-- | acf2/model/field.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/acf2/model/field.lua b/acf2/model/field.lua index 8cbc93f..e09b639 100644 --- a/acf2/model/field.lua +++ b/acf2/model/field.lua @@ -46,8 +46,8 @@ function M.Field:init(params) if self.editable == nil then self.editable = not self.compute end - if self.choice and not self['ui-choice'] then - self['ui-choice'] = util.map( + if self.choice and not self.ui_choice then + self.ui_choice = util.map( function(name) return self:auto_ui_name(name) end, self.choice ) @@ -69,7 +69,7 @@ function M.Field:meta(context) res.default = self.default res.choice = self.choice res.widget = self.widget - res['ui-choice'] = self['ui-choice'] + res['ui-choice'] = self.ui_choice return res end |