Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.eachComputedProperty((name, meta) => {
if (meta.isRelationship) {
meta.key = name;
let modelName = typeForRelationshipMeta(meta);
assert(`You specified a hasMany (${meta.type}) on ${parentModelName} but ${meta.type} was not found.`, modelName);
if (!types.includes(modelName)) {
assert(`Trying to sideload ${name} on ${this.toString()} but the type doesn't exist.`, !!modelName);
types.push(modelName);
}
}
});