fix: load field when source collection not found
This commit is contained in:
		
							parent
							
								
									16ad19b18d
								
							
						
					
					
						commit
						95bec2278f
					
				@ -298,8 +298,7 @@ export class Collection<
 | 
			
		||||
        this.db.logger.warn(
 | 
			
		||||
          `source collection "${sourceCollectionName}" not found for field "${name}" at collection "${this.name}"`,
 | 
			
		||||
        );
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      } else {
 | 
			
		||||
        const sourceField = sourceCollection.fields.get(sourceFieldName);
 | 
			
		||||
 | 
			
		||||
        if (!sourceField) {
 | 
			
		||||
@ -310,6 +309,7 @@ export class Collection<
 | 
			
		||||
          options = { ...lodash.omit(sourceField.options, ['name', 'primaryKey']), ...options };
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    this.emit('field.beforeAdd', name, options, { collection: this });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user