Module:Icon: Difference between revisionsGive feedback
m replaced to not break previous usage |
m add name to error msg |
||
| Line 10: | Line 10: | ||
-- Get icon data by name | -- Get icon data by name | ||
local function getIconData(iconName) | local function getIconData(iconName) | ||
local entry = iconData[iconName:lower()] | |||
if entry then | |||
return entry, nil | |||
end | |||
return nil, string.format("[[:Category:Module:Icon ERROR|Icon not found]] ('%s'). [[Category:Module:Icon ERROR]]", iconName) | |||
end | end | ||