浏览代码

Changed config getter.

Oskar Wrobel 9 年之前
父节点
当前提交
bfae21e76c
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      packages/ckeditor5-editor-classic/src/classiceditorui.js

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

@@ -61,8 +61,10 @@ export default class ClassicEditorUI extends BoxedEditorUI {
 	 * @inheritDoc
 	 */
 	init() {
-		if ( this.editor.config.toolbar ) {
-			this.toolbar.addButtons( this.editor.config.toolbar );
+		const toolbar = this.editor.config.get( 'toolbar' );
+
+		if ( toolbar ) {
+			this.toolbar.addButtons( toolbar );
 		}
 
 		return super.init();