|
@@ -77,20 +77,6 @@ export default class ComponentFactory {
|
|
|
* @param {Function} callback The callback that returns the component.
|
|
* @param {Function} callback The callback that returns the component.
|
|
|
*/
|
|
*/
|
|
|
add( name, callback ) {
|
|
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 } );
|
|
this._components.set( getNormalized( name ), { callback, originalName: name } );
|
|
|
}
|
|
}
|
|
|
|
|
|