Fix #283
This commit is contained in:
parent
4abe7f4954
commit
07dbbd4224
|
@ -391,13 +391,13 @@ util.inherits(HasOne, Relation);
|
|||
* EmbedsOne subclass
|
||||
* @param {RelationDefinition|Object} definition
|
||||
* @param {Object} modelInstance
|
||||
* @returns {EmbedsMany}
|
||||
* @returns {EmbedsOne}
|
||||
* @constructor
|
||||
* @class EmbedsOne
|
||||
*/
|
||||
function EmbedsOne(definition, modelInstance) {
|
||||
if (!(this instanceof EmbedsOne)) {
|
||||
return new EmbedsMany(definition, modelInstance);
|
||||
return new EmbedsOne(definition, modelInstance);
|
||||
}
|
||||
assert(definition.type === RelationTypes.embedsOne);
|
||||
Relation.apply(this, arguments);
|
||||
|
|
Loading…
Reference in New Issue