8
0
Prechádzať zdrojové kódy

Minor code refactoring in Template class.

Aleksander Nowodzinski 10 rokov pred
rodič
commit
37e6790739

+ 2 - 9
packages/ckeditor5-engine/src/ui/template.js

@@ -65,15 +65,8 @@ export default class Template {
 			throw new CKEditorError( 'ui-template-wrong-syntax' );
 		}
 
-		let el;
-
-		if ( isText ) {
-			el = this._renderText( def );
-		} else {
-			el = this._renderElement( def, intoFragment );
-		}
-
-		return el;
+		return isText ?
+			this._renderText( def ) : this._renderElement( def, intoFragment );
 	}
 
 	/**