aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/dataforms.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index 1619ddc5..b9fd23f2 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -37,7 +37,7 @@ function form_t.form(layout, data)
-- Add field tag
form:tag("field", { type = field_type, var = field.name, label = field.label });
- local value = data[field.name] or field.value;
+ local value = (data and data[field.name]) or field.value;
-- Add value, depending on type
if field_type == "hidden" then