Procházet zdrojové kódy

Bring back UI component overriding.

Maciej Gołaszewski před 5 roky
rodič
revize
b2aa4877b3
1 změnil soubory, kde provedl 0 přidání a 14 odebrání
  1. 0 14
      packages/ckeditor5-ui/src/componentfactory.js

+ 0 - 14
packages/ckeditor5-ui/src/componentfactory.js

@@ -77,20 +77,6 @@ export default class ComponentFactory {
 	 * @param {Function} callback The callback that returns the component.
 	 */
 	add( name, callback ) {
-		if ( this.has( name ) ) {
-			/**
-			 * The item already exists in the component factory.
-			 *
-			 * @error componentfactory-item-exists
-			 * @param {String} name The name of the component.
-			 */
-			throw new CKEditorError(
-				'componentfactory-item-exists',
-				this,
-				{ name }
-			);
-		}
-
 		this._components.set( getNormalized( name ), { callback, originalName: name } );
 	}