I am getting the error "Can't convert undefined to object on the line return hasOwnProperty(prop);
and I simply cannot figure out where the problem lies. I can post more of the code if necessary.
getCardProperty : function (card, prop, def) {
if (typeof def === "undefined") {
def = null;
}
// json synckolab object
if (card.synckolab) {
if (card.hasOwnProperty(prop)) // TODO better check for undefined?
{
return hasOwnProperty(prop);
}
return null;
}