瀏覽代碼

Code refactorin in the editor-classic package.

Internal: Aligned the UI to the latest API of the framework (see ckeditor/ckeditor5-ui#262).
Aleksander Nowodzinski 8 年之前
父節點
當前提交
72fa053bc8
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      packages/ckeditor5-editor-classic/src/classiceditorui.js

+ 2 - 4
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -67,7 +67,7 @@ export default class ClassicEditorUI {
 		view.stickyPanel.bind( 'isActive' ).to( this.focusTracker, 'isFocused' );
 		view.stickyPanel.limiterElement = view.element;
 
-		if ( this._toolbarConfig && this._toolbarConfig.viewportTopOffset ) {
+		if ( this._toolbarConfig.viewportTopOffset ) {
 			view.stickyPanel.viewportTopOffset = this._toolbarConfig.viewportTopOffset;
 		}
 
@@ -79,9 +79,7 @@ export default class ClassicEditorUI {
 
 		this.focusTracker.add( this.view.editableElement );
 
-		if ( this._toolbarConfig ) {
-			this.view.toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );
-		}
+		this.view.toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );
 
 		enableToolbarKeyboardFocus( {
 			origin: editor.editing.view,