diff --git a/mods/rgt_cosmetics/wearables.lua b/mods/rgt_cosmetics/wearables.lua index 222abba..6864664 100644 --- a/mods/rgt_cosmetics/wearables.lua +++ b/mods/rgt_cosmetics/wearables.lua @@ -63,9 +63,9 @@ function ns.apply_wearable_part(m, w, i) end function ns.apply_wearable(m, wearable) - local w = type(wearable) == "string" and ns.wearables[wearable] or wearable + local w = ns.wearables[wearable] -- Do nothing if we're already wearing this. - if m.wearing[w.name] then return end + if not w or m.wearing[w.name] then return end local item = {} for i, x in ipairs(w.attachments) do x.name = w.name