Module:Crafting: Difference between revisions

m
Maybe this is a better nil check
m (nil check)
m (Maybe this is a better nil check)
Line 121: Line 121:
local enchanted = args['enchanted'] or args['Enchanted']
local enchanted = args['enchanted'] or args['Enchanted']
spriteDiv:attr('data-enchanted', enchanted)
spriteDiv:attr('data-enchanted', enchanted)
if enchanted ~= nil then
if enchanted and #enchanted ~= 0 then
spriteDiv:addClass("enchanted")
spriteDiv:addClass("enchanted")
end
end
Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,659

edits