Emmy-love-api
Emmy-love-api copied to clipboard
Fix parent of class declaration.
For anyone who uses this script for latest love-api, the class declaration may have no parent.
https://github.com/EmmyLua/Emmy-love-api/blob/f9b185591677788ab0b133340a3783591c070971/genEmmyAPI.lua#L74-L75
Changing that line to this
if type.supertypes and type.supertypes[1] then
code = code .. ' : ' .. type.supertypes[1]
fixes the problem.