Explorar el Código

Update src/codeblockcommand.js

Co-Authored-By: Maciej <jodator@jodator.net>
Aleksander Nowodzinski hace 6 años
padre
commit
7a39a25e4f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/ckeditor5-code-block/src/codeblockcommand.js

+ 1 - 1
packages/ckeditor5-code-block/src/codeblockcommand.js

@@ -46,7 +46,7 @@ export default class CodeBlockCommand extends Command {
 		const editor = this.editor;
 		const model = editor.model;
 		const selection = model.document.selection;
-		const firstLanguageInConfig = editor.config.get( 'codeBlock' ).languages[ 0 ];
+		const firstLanguageInConfig = editor.config.get( 'codeBlock.languages' ).shift();
 
 		const blocks = Array.from( selection.getSelectedBlocks() );
 		const value = ( options.forceValue === undefined ) ? !this.value : options.forceValue;