We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 412d1c2 commit 79595ddCopy full SHA for 79595dd
1 file changed
lua/themepark.lua
@@ -133,7 +133,17 @@ function themepark:columns(...)
133
local cols = v
134
if type(v) == 'string' then
135
local elements = osm2pgsql.split_string(v, '/')
136
- cols = self._columns[elements[1]][elements[2]]
+ if #elements ~= 2 then
137
+ error("Use 'theme/column' format or table with columns as parameters in columns() function", 2)
138
+ end
139
+ local column_theme = self._columns[elements[1]]
140
+ if not column_theme then
141
+ error("Unknown column theme '" .. elements[1] .. "'", 2)
142
143
+ if not column_theme[elements[2]] then
144
+ error("Unknown column '" .. elements[2] .. "' in theme '" .. elements[1] .. "'", 2)
145
146
+ cols = column_theme[elements[2]]
147
end
148
for _, c in ipairs(cols) do
149
table.insert(columns, c)
0 commit comments