Skip to content

Commit

Permalink
fix prepareEmbeddedInstance
Browse files Browse the repository at this point in the history
Signed-off-by: Lida <l.feoktistova@awatera.com>
  • Loading branch information
l-feoktistova-awatera committed Dec 14, 2020
1 parent a0de6bc commit 974d91d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/relation-definition.js
Expand Up @@ -2193,7 +2193,7 @@ EmbedsOne.prototype.related = function(condOrRefresh, options, cb) {
};

EmbedsOne.prototype.prepareEmbeddedInstance = function(inst) {
if (inst && inst.triggerParent !== 'function') {
if (inst && typeof inst.triggerParent !== 'function') {
const self = this;
const propertyName = this.definition.keyFrom;
const modelInstance = this.modelInstance;
Expand Down Expand Up @@ -2595,7 +2595,7 @@ RelationDefinition.embedsMany = function embedsMany(modelFrom, modelToRef, param
};

EmbedsMany.prototype.prepareEmbeddedInstance = function(inst) {
if (inst && inst.triggerParent !== 'function') {
if (inst && typeof inst.triggerParent !== 'function') {
const self = this;
const propertyName = this.definition.keyFrom;
const modelInstance = this.modelInstance;
Expand Down

0 comments on commit 974d91d

Please sign in to comment.