Merge pull request #8 from strongloop/fix/handling-of-dynamic-properties
Fix crash in `id(model, prop)`
This commit is contained in:
commit
2868eaeda2
|
@ -104,10 +104,7 @@ Connector.prototype.idNames = function (model) {
|
|||
*/
|
||||
Connector.prototype.id = function (model, prop) {
|
||||
var p = this._models[model].properties[prop];
|
||||
if (!p) {
|
||||
console.trace('Property not found: ' + model + '.' + prop);
|
||||
}
|
||||
return p.id;
|
||||
return p && p.id;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue