Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change to avoid TypeError if this[k] is undefined (fixing #36)

  • Loading branch information...
commit faf4895272f51e9e09634dcd6a23e577d3dc7749 1 parent afd9753
@dresende authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/orm.js
View
2  lib/orm.js
@@ -159,7 +159,7 @@ ORM.prototype.define = function (model, fields, colParams) {
}
break;
default:
- data[k] = (this[k].hasOwnProperty("toString") ? this[k].toString() : this[k]);
+ data[k] = (this[k] && this[k].hasOwnProperty("toString") ? this[k].toString() : this[k]);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.