mirror of
https://github.com/strapi/strapi.git
synced 2025-11-12 08:08:05 +00:00
Dont break on attribute not found
This commit is contained in:
parent
fe38c95e11
commit
1ee6e62329
@ -31,6 +31,8 @@ module.exports = function createComponentBuilder() {
|
|||||||
const targetCT = this.contentTypes.get(uid);
|
const targetCT = this.contentTypes.get(uid);
|
||||||
const targetAttribute = targetCT.getAttribute(attribute.via);
|
const targetAttribute = targetCT.getAttribute(attribute.via);
|
||||||
|
|
||||||
|
if (!targetAttribute) return;
|
||||||
|
|
||||||
// do not delete polymorphic relations
|
// do not delete polymorphic relations
|
||||||
if (targetAttribute.collection === '*' || targetAttribute.model === '*') {
|
if (targetAttribute.collection === '*' || targetAttribute.model === '*') {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user