diff options
-rw-r--r-- | acf2/model/init.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/acf2/model/init.lua b/acf2/model/init.lua index 711626b..c9d95f9 100644 --- a/acf2/model/init.lua +++ b/acf2/model/init.lua @@ -55,7 +55,7 @@ local isinstance = object.isinstance local super = object.super local pth = require('acf2.path') -local update = require('acf2.util').update +local util = require('acf2.util') local stringy = require('stringy') @@ -105,7 +105,7 @@ function M.Reference:_choice(context) end end - else update(ch, {value=pth.escape(v), ['ui-value']=v}) end + else util.update(ch, {value=pth.escape(v), ['ui-value']=v}) end if ch then table.insert(res, ch) end end @@ -126,9 +126,9 @@ end function M.Reference:load(context, options) local ref = super(self, M.Reference):load(context) return ( - update( - options or {}, {dereference=self.dereference} - ).dereference and context.txn and ref + util.setdefault( + options or {}, 'dereference', self.dereference + ) and context.txn and ref ) and self:follow(context, ref) or ref end |