浏览代码

Internal: Simplified command execution.

Marek Lewandowski 6 年之前
父节点
当前提交
a35afb20f3
共有 1 个文件被更改,包括 1 次插入11 次删除
  1. 1 11
      packages/ckeditor5-special-characters/src/insertspecialcharactercommand.js

+ 1 - 11
packages/ckeditor5-special-characters/src/insertspecialcharactercommand.js

@@ -38,17 +38,7 @@ export default class InsertSpecialCharacterCommand extends Command {
 	 */
 	execute( options ) {
 		const editor = this.editor;
-		const item = options.item;
-
-		if ( !item ) {
-			return;
-		}
-
-		const character = editor.plugins.get( 'SpecialCharacters' ).getCharacter( item );
-
-		if ( !character ) {
-			return;
-		}
+		const character = editor.plugins.get( 'SpecialCharacters' ).getCharacter( options.item );
 
 		this._inputCommand.execute( { text: character } );
 	}