From 6821eddbd05f92957b87c6dc775e229841af8e11 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 23 Jan 2015 21:02:03 +0200 Subject: util: update: create a new table if destination is nil --- aconf/model/set.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aconf/model') diff --git a/aconf/model/set.lua b/aconf/model/set.lua index 8b51f12..897e1bf 100644 --- a/aconf/model/set.lua +++ b/aconf/model/set.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2012-2014 Kaarle Ritvanen +Copyright (c) 2012-2015 Kaarle Ritvanen See LICENSE file for license details --]] @@ -35,7 +35,7 @@ function M.Set:init(context, params) local mt = getmetatable(self) function mt.get(k, options) - options = util.setdefaults(options or {}, {dereference=true}) + options = util.setdefaults(options, {dereference=true}) local i, v = find(k) if i then return mt.load(i, options) end if options.create then return v end -- cgit v1.2.3