File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/ckeditor5-core/src Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import { type Editor } from './editor/editor.js';
2121import type { LoadedPlugins , PluginConstructor } from './plugin.js' ;
2222import type { EditorConfig } from './editor/editorconfig.js' ;
2323
24+ import { cloneDeep } from 'es-toolkit/compat' ;
25+
2426/**
2527 * Provides a common, higher-level environment for solutions that use multiple {@link module:core/editor/editor~Editor editors}
2628 * or plugins that work outside the editor. Use it instead of {@link module:core/editor/editor~Editor.create `Editor.create()`}
@@ -177,7 +179,7 @@ export class Context {
177179 * Since _translate is called often and has no access to the editor config, this is the better place
178180 * to check if translations will be taken from the global variable and update config.language.ui accordingly.
179181 */
180- const globalTranslations = global . window . CKEDITOR_TRANSLATIONS ;
182+ const globalTranslations = cloneDeep ( global . window . CKEDITOR_TRANSLATIONS ) ;
181183 const uiLanguageFromConfig = typeof languageConfig === 'string' ? languageConfig : languageConfig . ui ;
182184 const hasMatchingTranslations = globalTranslations [ uiLanguageFromConfig ! ] ;
183185 const defaultGlobalTranslationsLanguage = Object . keys ( globalTranslations ) [ 0 ] ;
You can’t perform that action at this time.
0 commit comments