Dont break on attribute not found

This commit is contained in:
Alexandre Bodin 2020-01-08 14:57:33 +01:00
parent fe38c95e11
commit 1ee6e62329

View File

@ -31,6 +31,8 @@ module.exports = function createComponentBuilder() {
const targetCT = this.contentTypes.get(uid);
const targetAttribute = targetCT.getAttribute(attribute.via);
if (!targetAttribute) return;
// do not delete polymorphic relations
if (targetAttribute.collection === '*' || targetAttribute.model === '*') {
return;