Module:Favilink: Difference between revisions

Add additional condition to displayimage addition to prevent string.len error with nil
mNo edit summary
 
Line 93: Line 93:
if string.len(displayimg) > 4 then
if string.len(displayimg) > 4 then
if string.sub(displayimg, -4) == '.png' then
if string.sub(displayimg, -4) == '.png' then
     img = '[[File:' .. displayimg.. '|16px|link='..pagelink..']]'
     img = '[[File:' .. displayimg.. '|16px|link='..pagelink..'|alt=]]'
end
end
end
end