Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (ref) {
// Copy all the properties to the reference nodes.
let actualNode = getNode(this.graph.nodesById, ref);
let relations = actualNode.modelClass.getRelations();
_.forOwn(actualNode.model, (value, key) => {
if (!getRelation(relations, key) && !_.isFunction(value)) {
refNode.model[key] = value;
}
});
refNode.model.$omit(refNode.modelClass.uidProp, refNode.modelClass.uidRefProp);
}
}
return Promise.resolve(this.models);
}
}