Explorar o código

Remove redundant cloning values taken from editor.config.

Maciej Gołaszewski %!s(int64=7) %!d(string=hai) anos
pai
achega
18cd2d5b76
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      packages/ckeditor5-heading/src/utils.js

+ 1 - 2
packages/ckeditor5-heading/src/utils.js

@@ -22,8 +22,7 @@ export function getLocalizedOptions( editor ) {
 		const title = localizedTitles[ option.title ];
 
 		if ( title && title != option.title ) {
-			// Clone the option to avoid altering the original `config.heading.options`.
-			option = Object.assign( {}, option, { title } );
+			option.title = title;
 		}
 
 		return option;